[exim-cvs] testsuite: add --fail-any option to runtest

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Exim Git Commits Mailing List
Fecha:  
A: exim-cvs
Asunto: [exim-cvs] testsuite: add --fail-any option to runtest
Gitweb: https://git.exim.org/exim.git/commitdiff/65347ce3341c8386c3e2e1e9599c5c56e79838ec
Commit:     65347ce3341c8386c3e2e1e9599c5c56e79838ec
Parent:     8cb34ed5d75213c1d779076ab2959da54af98a1e
Author:     Heiko Schlittermann (HS12-RIPE) <hs@???>
AuthorDate: Sun Mar 28 19:05:10 2021 +0200
Committer:  Heiko Schlittermann (HS12-RIPE) <hs@???>
CommitDate: Sun Mar 28 19:15:17 2021 +0200


    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 0b236bc..ab9b2bb 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__