]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Do not destroy systests.output if there are no test.output files
authorEvan Hunt <each@isc.org>
Mon, 26 Feb 2018 18:37:08 +0000 (10:37 -0800)
committerEvan Hunt <each@isc.org>
Tue, 27 Feb 2018 18:04:30 +0000 (10:04 -0800)
(cherry picked from commit 38940619c632e7e67c7c34cd3c7ec0cc9ae329f9)

bin/tests/system/testsummary.sh

index b89c51da2f37cd557b21cfb6318995497bed201a..e61676b0e241d16ef1717112f1bbf192470a764d 100644 (file)
@@ -40,9 +40,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