Do not destroy systests.output if there are no test.output files

(cherry picked from commit 38940619c6)
This commit is contained in:
Evan Hunt
2018-02-26 10:37:08 -08:00
parent 791f26b2c9
commit fe8bec4b31

View File

@@ -35,9 +35,14 @@ while getopts "n" flag; do
esac
done
cat */test.output > systests.output 2> /dev/null
if [ $keepfile -eq 0 ]; then
rm -f */test.output
if [ `ls */test.output 2> /dev/null | wc -l` -eq 0 ]; then
echowarn "I:No 'test.output' files were found."
echowarn "I:Printing summary from pre-existing 'systests.output'."
else
cat */test.output > systests.output
if [ $keepfile -eq 0 ]; then
rm -f */test.output
fi
fi
status=0