tests: add and use bt_grep_ok
[babeltrace.git] / tests / plugins / src.ctf.fs / fail / test-fail.sh
index c15e067ecfab219bd79ac37e73195b4b3773244f..8e01469bf30e52ff771dc045722526acc4a2e286 100755 (executable)
@@ -41,11 +41,15 @@ test_fail() {
        # even if Babeltrace aborts (e.g. hits an assert).  Check that the
        # Babeltrace CLI finishes gracefully by checking that the error stream
        # contains an error stack printed by the CLI.
-       bt_grep --silent "^CAUSED BY " "${stderr_file}"
-       ok $? "Trace ${name}: babeltrace produces an error stack"
-
-       bt_grep --silent "${expected_error_msg}" "${stderr_file}"
-       ok $? "Trace ${name}: babeltrace produces the expected error message"
+       bt_grep_ok \
+               "^CAUSED BY " \
+               "$stderr_file" \
+               "Trace $name: babeltrace produces an error stack"
+
+       bt_grep_ok \
+               "$expected_error_msg" \
+               "$stderr_file" \
+               "Trace $name: babeltrace produces the expected error message"
 }
 
 
This page took 0.024065 seconds and 4 git commands to generate.