3 # SPDX-License-Identifier: GPL-2.0-only
5 # Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com>
6 # Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
9 # Execute a shell command in the appropriate environment to have access to the
10 # bt2 Python bindings. For example, one could use it to run a specific Python
11 # binding test case with:
13 # $ tests/utils/run_python_bt2 python3 ./tests/utils/python/testrunner.py \
14 # -t test_value.MapValueTestCase.test_deepcopy \
15 # ./tests/bindings/python/bt2
17 if [ -n "${BT_TESTS_SRCDIR:-}" ]; then
18 UTILSSH
="$BT_TESTS_SRCDIR/utils/utils.sh"
20 UTILSSH
="$(dirname "$0")/../utils/utils.sh"
23 # shellcheck source=../utils/utils.sh
27 echo "Usage: run_python_bt2 [PYTHON_BIN] ..."
29 echo "Run a binary with the python environment set to use the 'bt2' module"
30 echo "from the build system prior to installation."
32 echo "When building out of tree export the BT_TESTS_BUILDDIR variable with"
33 echo "the path to the built 'tests' directory."
41 # Sanity check that the BT_TESTS_BUILDDIR value makes sense.
42 if [ ! -f "$BT_TESTS_BUILDDIR/Makefile" ]; then
44 $0: BT_TESTS_BUILDDIR does not point to a valid directory (\`$BT_TESTS_BUILDDIR/Makefile\` does not exist).
46 If building out-of-tree, set BT_TESTS_BUILDDIR to point to the \`tests\` directory in the build tree.
This page took 0.033911 seconds and 5 git commands to generate.