tests: add and use bt_grep_ok
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 6 Nov 2023 18:41:38 +0000 (18:41 +0000)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 9 Nov 2023 16:14:34 +0000 (11:14 -0500)
commitdb01f759a69290bc1608f60c2942c4c36a282708
treebac548235681c29ee58a84f4178ccdf1a3b10668
parent407d3b1055a8457c8927fb4ae79841774c1872d1
tests: add and use bt_grep_ok

When a test that consists of matching a pattern in a file using grep
fails (sometimes just in the CI), it would be useful to see the file
contents to understand what happened.  Add the `bt_grep_ok` utility
function.  It tries to match a pattern in a file using `grep`, then
issues a test result.  If the test failed, it prints the content of the
file on stderr.

Change-Id: I464e414b334052677799ce201483095fa9bff4c3
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11169
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
tests/cli/convert/test-auto-source-discovery-grouping.sh
tests/cli/query/test-query.sh
tests/cli/test-help.sh
tests/cli/test-intersection.sh
tests/plugins/src.ctf.fs/fail/test-fail.sh
tests/plugins/src.ctf.fs/query/test-query-metadata-info.sh
tests/plugins/src.ctf.fs/test-deterministic-ordering.sh
tests/utils/utils.sh
This page took 0.025565 seconds and 4 git commands to generate.