tests: bt2: add `--test-case` argument to testrunner.py
[babeltrace.git] / tests / utils / utils.sh
index 4add2afa354f340f8a73802b5074c466152f2798..5b9f0e96d17d9ab31ccdc647da4cb3ddceb6b70d 100644 (file)
@@ -45,11 +45,17 @@ fi
 # Allow overriding the babeltrace2 executables
 if [ "x${BT_TESTS_BT2_BIN:-}" = "x" ]; then
        BT_TESTS_BT2_BIN="$BT_TESTS_BUILDDIR/../src/cli/babeltrace2"
+       if [ "x${MSYSTEM:-}" != "x" ]; then
+               BT_TESTS_BT2_BIN="${BT_TESTS_BT2_BIN}.exe"
+       fi
 fi
 export BT_TESTS_BT2_BIN
 
 if [ "x${BT_TESTS_BT2LOG_BIN:-}" = "x" ]; then
        BT_TESTS_BT2LOG_BIN="$BT_TESTS_BUILDDIR/../src/cli/babeltrace2-log"
+       if [ "x${MSYSTEM:-}" != "x" ]; then
+               BT_TESTS_BT2LOG_BIN="${BT_TESTS_BT2LOG_BIN}.exe"
+       fi
 fi
 export BT_TESTS_BT2LOG_BIN
 
@@ -222,7 +228,7 @@ run_python_bt2() {
 # $2 : The pattern to match python test script names (optional)
 run_python_bt2_test() {
        local test_dir="$1"
-       local test_pattern="${2:-}" # optional
+       local test_pattern="${2:-'*'}" # optional, if none default to "*"
 
        local ret
        local test_runner_args=()
@@ -241,7 +247,9 @@ run_python_bt2_test() {
        run_python_bt2 \
                "${python_exec}" \
                "${BT_TESTS_SRCDIR}/utils/python/testrunner.py" \
-               "${test_runner_args[@]}"
+               --pattern "$test_pattern" \
+               "$test_dir" \
+
        ret=$?
 
        if test "x${BT_TESTS_COVERAGE_REPORT:-}" = "x1"; then
This page took 0.025383 seconds and 4 git commands to generate.