if [ -z "${BT_TESTS_BT2_BIN:-}" ]; then
BT_TESTS_BT2_BIN="$BT_TESTS_BUILDDIR/../src/cli/babeltrace2"
if [ "$BT_TESTS_OS_TYPE" = "mingw" ]; then
- BT_TESTS_BT2_BIN="${BT_TESTS_BT2_BIN}.exe"
+ BT_TESTS_BT2_BIN+=".exe"
fi
fi
export BT_TESTS_BT2_BIN
fi
# Forwards the arguments to `coverage run`.
-check_coverage() {
+_bt_tests_check_coverage() {
coverage run "$@"
}
local python_exec
if test "${BT_TESTS_COVERAGE:-}" = "1"; then
- python_exec="check_coverage"
+ python_exec="_bt_tests_check_coverage"
else
python_exec="${BT_TESTS_PYTHON_BIN}"
fi
local -r input_file="$1"
local -r base_dir="$2"
- diag "Running: \`${BT_TESTS_PYTHON_BIN} ${BT_TESTS_SRCDIR}/utils/python/mctf.py --base-dir ${base_dir} ${input_file}\`"
+ echo "Running: \`${BT_TESTS_PYTHON_BIN} ${BT_TESTS_SRCDIR}/utils/python/mctf.py --base-dir ${base_dir} ${input_file}\`" >&2
run_python "${BT_TESTS_PYTHON_BIN}" "${BT_TESTS_SRCDIR}/utils/python/mctf.py" \
--base-dir "${base_dir}" "${input_file}"
}