3 # SPDX-License-Identifier: GPL-2.0-only
5 # Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
10 if [ "x${BT_TESTS_SRCDIR:-}" != "x" ]; then
11 UTILSSH
="$BT_TESTS_SRCDIR/utils/utils.sh"
13 UTILSSH
="$(dirname "$0")/../utils/utils.sh"
16 # shellcheck source=../utils/utils.sh
23 tmp_metadata
=$
(mktemp
)
25 # Test a valid trace directory.
26 "${BT_TESTS_BT2_BIN}" -o ctf-metadata
"${BT_CTF_TRACES_PATH}/succeed/wk-heartbeat-u" > "$tmp_metadata"
27 ok $?
"Run babeltrace -o ctf-metadata with a valid trace directory, correct exit status"
29 cmp -s "$tmp_metadata" "${BT_TESTS_DATADIR}/cli/test_output_ctf_metadata.ref"
30 ok $?
"Run babeltrace -o ctf-metadata with a valid trace directory, correct output"
32 # Test an invalid trace directory.
33 "${BT_TESTS_BT2_BIN}" -o ctf-metadata
"${BT_CTF_TRACES_PATH}" >/dev
/null
2>&1
34 isnt $?
0 "Run babeltrace -o ctf-metadata with an invalid trace directory, expecting failure"
This page took 0.032408 seconds and 4 git commands to generate.