Skip to content

Commit

Permalink
all.sh: clean up some uses of "local" variables
Browse files Browse the repository at this point in the history
While pure sh doesn't have a concept of local variables, we can partially
emulate them by unsetting variables before we exit the function, and use the
convention of giving them lowercase names to distinguish from global
variables.

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
  • Loading branch information
mpg committed Jun 8, 2020
1 parent f1f180a commit 304b099
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/scripts/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -682,11 +682,12 @@ component_check_names () {
component_check_test_cases () {
msg "Check: test case descriptions" # < 1s
if [ $QUIET -eq 1 ]; then
OPT='--quiet'
opt='--quiet'
else
OPT=''
opt=''
fi
record_status tests/scripts/check-test-cases.py $OPT
record_status tests/scripts/check-test-cases.py $opt
unset opt
}

component_check_doxygen_warnings () {
Expand Down Expand Up @@ -1942,7 +1943,7 @@ run_component () {

# Restore the build tree to a clean state.
cleanup
current_component=""
unset current_component
}

# Preliminary setup
Expand Down

0 comments on commit 304b099

Please sign in to comment.