summaryrefslogtreecommitdiff
path: root/Porting/bisect-runner.pl
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2015-02-11 17:24:33 +0000
committerHugo van der Sanden <hv@crypt.org>2015-02-11 19:50:42 +0000
commitf624cb736a20c433d4e81c202222fc4ff50afe4c (patch)
tree6eb947b640abcd2d17c67cacd167c09c81bb8605 /Porting/bisect-runner.pl
parent534577b24e15801a8f86e111297e0612ea16e4c5 (diff)
downloadperl-f624cb736a20c433d4e81c202222fc4ff50afe4c.tar.gz
Add --crash option for Porting/bisect
If --crash is specified, treat test cases as bad only if they exit with ($? & 0xff) non-zero.
Diffstat (limited to 'Porting/bisect-runner.pl')
-rwxr-xr-xPorting/bisect-runner.pl12
1 files changed, 11 insertions, 1 deletions
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl
index 5f78cf91f3..4d7a6f2314 100755
--- a/Porting/bisect-runner.pl
+++ b/Porting/bisect-runner.pl
@@ -53,7 +53,7 @@ push @paths, qw(/usr/local/lib /lib /usr/lib)
unless $linux64;
unless(GetOptions(\%options,
- 'target=s', 'make=s', 'jobs|j=i', 'expect-pass=i',
+ 'target=s', 'make=s', 'jobs|j=i', 'crash', 'expect-pass=i',
'expect-fail' => sub { $options{'expect-pass'} = 0; },
'clean!', 'one-liner|e=s@', 'c', 'l', 'w', 'match=s',
'no-match=s' => sub {
@@ -151,6 +151,8 @@ bisect.pl - use git bisect to pinpoint changes
.../Porting/bisect.pl --expect-fail --match '\buseithreads\b'
# When did this test program stop exiting 0?
.../Porting/bisect.pl -- ./perl -Ilib ../test_prog.pl
+ # When did this test program start crashing (any signal or coredump)?
+ .../Porting/bisect.pl --crash -- ./perl -Ilib ../test_prog.pl
# When did this first become valid syntax?
.../Porting/bisect.pl --target=miniperl --end=v5.10.0 \
--expect-fail -e 'my $a := 2;'
@@ -397,6 +399,13 @@ revision. The bisect run will find the first commit where it passes.
=item *
+--crash
+
+Treat any non-crash as success, any crash as failure. (Crashing defined
+as exiting with a signal or a core dump.)
+
+=item *
+
-D I<config_arg=value>
=item *
@@ -1137,6 +1146,7 @@ sub run_report_and_exit {
my $ret = run_with_options({setprgp => $options{setpgrp},
timeout => $options{timeout},
}, @_);
+ $ret &= 0xff if $options{crash};
report_and_exit(!$ret, 'zero exit from', 'non-zero exit from', "@_");
}