tests: run_python_bt2: error out if BT_TESTS_BUILDDIR does not point to a build directory
This patch improves the user experience when building out of tree, using
run_python_bt2, but forgetting to set BT_TESTS_BUILDDIR.
Currently, the script doesn't complain when you do this, but sets
variables (e.g. PYTHONPATH) to point to files/directories that don't
exist:
$ /home/simark/src/babeltrace/tests/utils/run_python_bt2 python3
>>> import bt2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'bt2'
With this patch, the user gets notified that they did something wrong:
/home/simark/src/babeltrace/tests/utils/run_python_bt2: BT_TESTS_BUILDDIR does
not point to a valid directory
(/home/simark/src/babeltrace/tests/utils/../utils/../Makefile does not exist).
If building out-of-tree, set BT_TESTS_BUILDDIR to point to the tests directory
in the build tree.
Change-Id: Ibbc6e11b6cbfce560ad97081d709ed4794c406b1
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1583
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
This page took 0.025988 seconds and 4 git commands to generate.