From: Daniel Stenberg Date: Wed, 7 Oct 2020 22:13:07 +0000 (+0200) Subject: runtests: return error if no tests ran X-Git-Tag: curl-7_74_0~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88bf689f94bc5717f1826192fbe2bea252804bcb;p=thirdparty%2Fcurl.git runtests: return error if no tests ran ... and make TESTFAIL stand out a little better by adding newlines before and after. Reported-by: Marc Hörsken Issue: #6052 Closes #6053 --- diff --git a/tests/runtests.pl b/tests/runtests.pl index 84feb73e0e..b962f1646d 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -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; }