From: Philippe Proulx Date: Fri, 10 Nov 2023 04:19:10 +0000 (-0500) Subject: tests/utils/utils.sh: run_python_bt2_test(): use `local -r` when possible X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=04c029a266e22c50c3d84f586d643abd1dd2b5b1 tests/utils/utils.sh: run_python_bt2_test(): use `local -r` when possible Signed-off-by: Philippe Proulx Change-Id: I02bda233ecb271078c443cc4fdd53022dfdcfa90 --- diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index aca52529..aa7353b7 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -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