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)
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>

No differences found
This page took 0.036515 seconds and 4 git commands to generate.