tests/utils/utils.sh: run_python_bt2_test(): use `local -r` when possible
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 10 Nov 2023 04:19:10 +0000 (23:19 -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: I02bda233ecb271078c443cc4fdd53022dfdcfa90

tests/utils/utils.sh

index aca52529a12f29884a8b82fb0877305d1c0ca9c1..aa7353b7781846c708b4b5c2d9a3037dd3af72cf 100644 (file)
@@ -457,10 +457,8 @@ run_python_bt2() {
 # the testing Python modules (in `tests/utils/python`) and the `bt2`
 # Python package.
 run_python_bt2_test() {
-       local test_dir="$1"
-       local test_pattern="${2:-'*'}"
-
-       local ret
+       local -r test_dir="$1"
+       local -r test_pattern="${2:-'*'}"
 
        if test "${BT_TESTS_COVERAGE:-}" = "1"; then
                python_exec="check_coverage"
@@ -474,7 +472,7 @@ run_python_bt2_test() {
                --pattern "$test_pattern" \
                "$test_dir" \
 
-       ret=$?
+       local -r ret=$?
 
        if test "${BT_TESTS_COVERAGE_REPORT:-}" = "1"; then
                coverage report -m
This page took 0.039517 seconds and 4 git commands to generate.