summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2021-03-27 12:52:18 +0100
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2021-03-27 23:33:17 +0100
commit87193ab87011f7c61fd9164e2a09913a55944340 (patch)
tree3d9ae7ea6401300fbe3ddef93e73c327b1dc0506 /test
parenteb4c9690438d90c1cdec65fb194a39eb7b7cf371 (diff)
testsuite: make runtest exit(!0) on failure in continue mode
This makes it possible to use `runtest -c <xx>` for `git bisect run …`
Diffstat (limited to 'test')
-rwxr-xr-xtest/runtest32
1 files changed, 22 insertions, 10 deletions
diff --git a/test/runtest b/test/runtest
index fbefff5e6..0b236bca1 100755
--- a/test/runtest
+++ b/test/runtest
@@ -4149,6 +4149,7 @@ if (not $force_continue) {
}
+my $failures = 0;
foreach $test (@test_list)
{
state $lasttestdir = '';
@@ -4382,10 +4383,12 @@ foreach $test (@test_list)
print "\nshow stdErr, show stdOut, Retry, Continue (without file comparison), or Quit? [Q] ";
$_ = $force_continue ? "c" : <T>;
tests_exit(1) if /^q?$/i;
- if (/^c$/ && $force_continue) {
- log_failure($log_failed_filename, $testno, "exit code unexpected");
- log_test($log_summary_filename, $testno, 'F')
- }
+ if (/^c$/ && $force_continue)
+ {
+ log_failure($log_failed_filename, $testno, "exit code unexpected");
+ log_test($log_summary_filename, $testno, 'F');
+ $failures++;
+ }
if ($force_continue)
{
print "\nstdout tail:\n";
@@ -4449,10 +4452,12 @@ foreach $test (@test_list)
print "\nShow server stdout, Retry, Continue, or Quit? [Q] ";
$_ = $force_continue ? "c" : <T>;
tests_exit(1) if /^q?$/i;
- if (/^c$/ && $force_continue) {
- log_failure($log_failed_filename, $testno, "exit code unexpected");
- log_test($log_summary_filename, $testno, 'F')
- }
+ if (/^c$/ && $force_continue)
+ {
+ log_failure($log_failed_filename, $testno, "exit code unexpected");
+ log_test($log_summary_filename, $testno, 'F');
+ $failures++;
+ }
print "... continue forced\n" if $force_continue;
last if /^[rc]$/i;
@@ -4487,7 +4492,14 @@ foreach $test (@test_list)
{
sleep 1 if $slow;
my $rc = check_output($TEST_STATE->{munge});
- log_test($log_summary_filename, $testno, 'P') if ($rc == 0);
+ if ($rc == 0)
+ {
+ log_test($log_summary_filename, $testno, 'P');
+ }
+ else
+ {
+ $failures++;
+ }
if ($rc < 2)
{
print (" Script completed\n");
@@ -4506,7 +4518,7 @@ foreach $test (@test_list)
##################################################
tests_exit(-1, "No runnable tests selected") if not @test_list;
-tests_exit(0);
+tests_exit($failures);
__END__