run-in-py-utils-bt2-env.sh: update usage and remove redundant comment
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 10 Nov 2023 14:17:17 +0000 (09:17 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 7 Feb 2024 21:25:56 +0000 (16:25 -0500)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I36137023cc7d9882d2695f5c9eb2dd8568463540

tests/utils/run-in-py-env.sh

index 2168f87b6e9591562934d81d762f6b3b45514f07..6f197d734da8a96e3a0dcf9810c886e2b130a2f0 100755 (executable)
@@ -2,17 +2,8 @@
 #
 # SPDX-License-Identifier: GPL-2.0-only
 #
-# Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com>
+# Copyright (C) 2017-2023 Philippe Proulx <pproulx@efficios.com>
 # Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
-#
-
-# Execute a shell command in the appropriate environment to have access to the
-# bt2 Python bindings. For example, one could use it to run a specific Python
-# binding test case with:
-#
-#   $ tests/utils/run-in-py-utils-bt2-env.sh python3 ./tests/utils/python/testrunner.py \
-#     -t test_value.MapValueTestCase.test_deepcopy \
-#     ./tests/bindings/python/bt2
 
 if [ -n "${BT_TESTS_SRCDIR:-}" ]; then
        UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh"
@@ -24,13 +15,14 @@ fi
 source "$UTILSSH"
 
 usage() {
-       echo "Usage: run-in-py-utils-bt2-env.sh [PYTHON_BIN] ..."
+       echo "Usage: run-in-py-utils-bt2-env.sh COMMAND [ARGS]..."
        echo ""
-       echo "Run a binary with the python environment set to use the 'bt2' module"
-       echo "from the build system prior to installation."
+       echo "Runs the command \`COMMAND\` with the arguments \`ARGS\` within an environment"
+       echo "which can import the testing Python modules (in \`tests/utils/python\`) and the"
+       echo "built \`bt2\` Python package."
        echo ""
-       echo "When building out of tree export the BT_TESTS_BUILDDIR variable with"
-       echo "the path to the built 'tests' directory."
+       echo "NOTE: If you build out of tree, export and set the \`BT_TESTS_BUILDDIR\`"
+       echo "environment variable to the built \`tests\` directory."
 }
 
 if [ -z "$*" ]; then
This page took 0.026051 seconds and 4 git commands to generate.