3 # SPDX-License-Identifier: GPL-2.0-only
5 # Copyright (C) 2017-2023 Philippe Proulx <pproulx@efficios.com>
6 # Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
8 if [[ -n ${BT_TESTS_SRCDIR:-} ]]; then
9 UTILSSH
=$BT_TESTS_SRCDIR/utils
/utils.sh
11 UTILSSH
=$
(dirname "$0")/..
/utils
/utils.sh
14 # shellcheck source=../utils/utils.sh
18 echo "Usage: run-in-py-utils-bt2-env.sh COMMAND [ARGS]..."
20 echo "Runs the command \`COMMAND\` with the arguments \`ARGS\` within an environment"
21 echo "which can import the testing Python modules (in \`tests/utils/python\`) and the"
22 echo "built \`bt2\` Python package."
24 echo "NOTE: If you build out of tree, export and set the \`BT_TESTS_BUILDDIR\`"
25 echo "environment variable to the built \`tests\` directory."
33 # Make sure the value of `BT_TESTS_BUILDDIR` makes sense
34 if [[ ! -f $BT_TESTS_BUILDDIR/Makefile
]]; then
36 echo "ERROR: Invalid \`BT_TESTS_BUILDDIR\` variable (\`\$BT_TESTS_BUILDDIR/Makefile\`"
37 echo "doesn't exist)."
39 echo "If you build out of tree, export and set the \`BT_TESTS_BUILDDIR\` environment"
40 echo "variable to the built \`tests\` directory."
46 bt_run_in_py_env
"${@}"
This page took 0.035578 seconds and 5 git commands to generate.