From: Heiko Schlittermann (HS12-RIPE) Date: Sun, 28 Mar 2021 17:05:10 +0000 (+0200) Subject: testsuite: add --fail-any option to runtest X-Git-Tag: exim-4.95-RC0~89 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/65347ce3341c8386c3e2e1e9599c5c56e79838ec testsuite: add --fail-any option to runtest This option makes runtest's exit status !0 on any failure in any test. (Useful in -c mode and git-bisect) --- diff --git a/test/runtest b/test/runtest index 0b236bca1..ab9b2bb95 100755 --- a/test/runtest +++ b/test/runtest @@ -2942,6 +2942,7 @@ GetOptions( 'valgrind' => \$valgrind, 'range=s{2}' => \my @range_wanted, 'test=i@' => \my @tests_wanted, + 'fail-any!' => \my $fail_any, 'flavor|flavour=s' => \$flavour, 'help' => sub { pod2usage(-exit => 0) }, 'man' => sub { @@ -4518,7 +4519,7 @@ foreach $test (@test_list) ################################################## tests_exit(-1, "No runnable tests selected") if not @test_list; -tests_exit($failures); +tests_exit($fail_any ? $failures : 0); __END__