tests: make test_trimmer use bt_cli
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 11 Nov 2019 21:55:42 +0000 (16:55 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 15 Nov 2019 18:08:12 +0000 (13:08 -0500)
... instead of launching babeltrace2.exe by hand.  This makes the
testsuite print the executed command lines, and is therefore easier to
debug.

Change-Id: I82f3984e749b8e6aff38b529ed462373eabd24dc
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
tests/cli/test_trimmer

index d6155785cd467b96d41b22e6d64574d876088da3..a4356ba4ca68e60db780490f5563dd43665f7fb6 100755 (executable)
@@ -51,7 +51,7 @@ function expect_success()
        local msg="$2"
        shift 2
 
-       "${BT_TESTS_BT2_BIN}" "${TRACE_PATH}" "$@" 2>/dev/null > "${tmp_out}"
+       bt_cli "${tmp_out}" /dev/null "${TRACE_PATH}" "$@"
        ok $? "trimmer: ${msg}: exit status"
 
        num_events=$(wc -l < "${tmp_out}")
@@ -76,7 +76,7 @@ function expect_failure()
 
        # We check the error message logged by the trimmer plugin, set the env
        # var necessary for it to log errors.
-       BABELTRACE_FLT_UTILS_TRIMMER_LOG_LEVEL=E "${BT_TESTS_BT2_BIN}" "${TRACE_PATH}" "$@" 2> "${tmp_err}" > "${tmp_out}"
+       BABELTRACE_FLT_UTILS_TRIMMER_LOG_LEVEL=E bt_cli "${tmp_out}" "${tmp_err}" "${TRACE_PATH}" "$@"
        isnt $? 0 "trimmer: ${msg}: exit status"
 
        num_events=$(wc -l < "${tmp_out}")
This page took 0.024376 seconds and 4 git commands to generate.