-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Running shellcheck on any script will yield a lot of warnings and errors. Please address these issues. Example:
Runner/suites/Multimedia/Graphics$ shellcheck run.sh
In run.sh line 7:
source $TOOLS/functestlib.sh
^--------------------------^ SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.
^-------------------^ SC1091 (info): Not following: ./functestlib.sh was not specified as input (see shellcheck -x).
^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
source "$TOOLS"/functestlib.sh
In run.sh line 12:
cd /Graphics
^----------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
Did you mean:
cd /Graphics || exit
In run.sh line 24:
if [ $OUTPUT == *"Loaded GMU firmware"* ]; then
^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
^---------------------^ SC2081 (error): [ .. ] can't match globs. Use a case statement.
Did you mean:
if [ "$OUTPUT" == *"Loaded GMU firmware"* ]; then
In run.sh line 26:
echo "$TESTNAME : Test Passed" > $test_path/$TESTNAME.res
^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
echo "$TESTNAME : Test Passed" > "$test_path"/$TESTNAME.res
In run.sh line 29:
echo "$TESTNAME : Test Failed" > $test_path/$TESTNAME.res
^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
echo "$TESTNAME : Test Failed" > "$test_path"/$TESTNAME.res
For more information:
https://www.shellcheck.net/wiki/SC2081 -- [ .. ] can't match globs. Use a c...
https://www.shellcheck.net/wiki/SC2164 -- Use 'cd ... || exit' or 'cd ... |...
https://www.shellcheck.net/wiki/SC3014 -- In POSIX sh, == in place of = is ...
Metadata
Metadata
Assignees
Labels
No labels