From cdd45727d949f2a07524648865631994ac296a63 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 4 Aug 2022 16:32:56 -0400 Subject: [PATCH] tests/cli/test_trace_read: use `bt_cli` and `isnt` This makes the output more readable/analyzable on failure. Signed-off-by: Simon Marchi Signed-off-by: Philippe Proulx Change-Id: I6bb7d76538c843a50e605756493de0755cc9ca11 Reviewed-on: https://review.lttng.org/c/babeltrace/+/12747 --- tests/cli/test-trace-read.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/cli/test-trace-read.sh b/tests/cli/test-trace-read.sh index b3a30a7e..f8c560be 100755 --- a/tests/cli/test-trace-read.sh +++ b/tests/cli/test-trace-read.sh @@ -25,15 +25,12 @@ plan_tests $NUM_TESTS for path in "${SUCCESS_TRACES[@]}"; do trace=$(basename "${path}") - "${BT_TESTS_BT2_BIN}" "${path}" > /dev/null 2>&1 + bt_cli /dev/null /dev/null "${path}" ok $? "Run babeltrace2 with trace ${trace}" done for path in "${FAIL_TRACES[@]}"; do trace=$(basename "${path}") - if "${BT_TESTS_BT2_BIN}" "${path}" > /dev/null 2>&1; then - fail "Run babeltrace2 with invalid trace ${trace}" - else - pass "Run babeltrace2 with invalid trace ${trace}" - fi + bt_cli /dev/null /dev/null "${path}" + isnt "$?" 0 "Run babeltrace2 with invalid trace ${trace}" done -- 2.34.1