]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: return error if no tests ran
authorDaniel Stenberg <daniel@haxx.se>
Wed, 7 Oct 2020 22:13:07 +0000 (00:13 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 15 Oct 2020 13:50:11 +0000 (15:50 +0200)
... and make TESTFAIL stand out a little better by adding newlines
before and after.

Reported-by: Marc Hörsken
Issue: #6052
Closes #6053

tests/runtests.pl

index 84feb73e0e79e7e42e7f483f6d21a6b5730d1884..b962f1646d066b2009e122144d0c2029ff9ce2d7 100755 (executable)
@@ -5775,11 +5775,11 @@ if($total) {
                    $ok/$total*100);
 
     if($ok != $total) {
-        logmsg "TESTFAIL: These test cases failed: $failed\n";
+        logmsg "\nTESTFAIL: These test cases failed: $failed\n\n";
     }
 }
 else {
-    logmsg "TESTFAIL: No tests were performed\n";
+    logmsg "\nTESTFAIL: No tests were performed\n\n";
 }
 
 if($all) {
@@ -5816,6 +5816,6 @@ if($skipped && !$short) {
     }
 }
 
-if($total && (($ok+$ign) != $total)) {
+if(($total && (($ok+$ign) != $total)) || !$total) {
     exit 1;
 }