From 04c029a266e22c50c3d84f586d643abd1dd2b5b1 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Thu, 9 Nov 2023 23:19:10 -0500 Subject: [PATCH] tests/utils/utils.sh: run_python_bt2_test(): use `local -r` when possible Signed-off-by: Philippe Proulx Change-Id: I02bda233ecb271078c443cc4fdd53022dfdcfa90 --- tests/utils/utils.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 -- 2.34.1