From 65347ce3341c8386c3e2e1e9599c5c56e79838ec Mon Sep 17 00:00:00 2001 From: "Heiko Schlittermann (HS12-RIPE)" Date: Sun, 28 Mar 2021 19:05:10 +0200 Subject: [PATCH] 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) --- test/runtest | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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__ -- 2.30.2