We were setting a global variable FAIL on failure, but if we failed inside a subshell (which a very small number of tests might do), this setting would be lost. The script output (a series of failed/warning lines) was still valid, but not the return code, so the shell might be selected even if one of these tests failed. To avoid the problem, put the fail/warning state in the filesystem instead, which is shared across subshells.
7 lines
181 B
Text
7 lines
181 B
Text
/bin/ls [0-9s][0-9][0-9]*/clean.do |
|
|
sed 's/\.do$//' |
|
|
xargs redo
|
|
|
|
rm -f broken shellfile shelltest.warned shelltest.failed \
|
|
*~ .*~ stress.log flush-cache
|
|
rm -rf 'space home dir'
|