tests/utils/utils.sh: run_python_bt2_test(): use `local -r` when possible
[babeltrace.git] / 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.022905 seconds and 4 git commands to generate.