Fix: format string warnings on mingw
[babeltrace.git] / tests / utils / run_python_bt2
index bd9f05f9782808782fe4b9187f045fe968385f0f..c016624fb99d6579273eada54d6b0b92b6ccebaf 100755 (executable)
@@ -22,7 +22,9 @@
 # bt2 Python bindings. For example, one could use it to run a specific Python
 # binding test case with:
 #
-#   $ ./run_python_bt2 python3 -m unittest test_values.MapValueTestCase.test_deepcopy
+#   $ tests/utils/run_python_bt2 python3 ./tests/utils/python/testrunner.py \
+#     -t test_value.MapValueTestCase.test_deepcopy \
+#     ./tests/bindings/python/bt2
 
 if [ "x${BT_TESTS_SRCDIR:-}" != "x" ]; then
        UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh"
@@ -45,6 +47,17 @@ usage() {
 
 if [ "x$*" = "x" ]; then
        usage
-else
-       run_python_bt2 "${@}"
+       exit 1
 fi
+
+# Sanity check that the BT_TESTS_BUILDDIR value makes sense.
+if [ ! -f "$BT_TESTS_BUILDDIR/Makefile" ]; then
+       fold -w 80 -s <<- END
+       $0: BT_TESTS_BUILDDIR does not point to a valid directory (\`$BT_TESTS_BUILDDIR/Makefile\` does not exist).
+
+       If building out-of-tree, set BT_TESTS_BUILDDIR to point to the \`tests\` directory in the build tree.
+       END
+       exit 1
+fi
+
+run_python_bt2 "${@}"
This page took 0.024046 seconds and 4 git commands to generate.