X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Futils%2Frun_python_bt2;h=c016624fb99d6579273eada54d6b0b92b6ccebaf;hb=b841eced73b140d37c264befa35279e8b357c0d3;hp=7147da4ae0b675bbb4d9d4ab0a82cbc24858eb0f;hpb=75948c32af7168b25c864db28e8c695bb797a0dd;p=babeltrace.git diff --git a/tests/utils/run_python_bt2 b/tests/utils/run_python_bt2 index 7147da4a..c016624f 100755 --- a/tests/utils/run_python_bt2 +++ b/tests/utils/run_python_bt2 @@ -47,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 "${@}"