]> 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)
committerMichał Kępień <michal@isc.org>
Tue, 27 Feb 2018 08:47:59 +0000 (09:47 +0100)
bin/tests/system/testsummary.sh

index 9d6c2f3939126eff3a703f752cd81d48f5984150..06c356671a64836d27139fe940b08795f76d2df0 100644 (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