diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-11-01 22:48:41 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-11-01 22:48:41 +0100 |
commit | e2760528720bf060a1f8246c3c77820e4aed7448 (patch) | |
tree | d5bde2d352c055746a80f36c08fb21b511d59762 | |
parent | fc4401c6b354576e72009cd9eee271deca608281 (diff) | |
download | perl-e2760528720bf060a1f8246c3c77820e4aed7448.tar.gz |
In bisect.pl, provide a default test for --validate, and summary output.
If no test case is specified for --validate, use TEST to run t/base/*.t
We can't run minitest because some tests fail on earlier versions, and
bisect-runner.pl intentionally doesn't patch any regression tests.
-rwxr-xr-x | Porting/bisect-runner.pl | 3 | ||||
-rwxr-xr-x | Porting/bisect.pl | 14 |
2 files changed, 15 insertions, 2 deletions
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl index d6e9c23dd6..194fbb95fb 100755 --- a/Porting/bisect-runner.pl +++ b/Porting/bisect-runner.pl @@ -418,6 +418,9 @@ OS/CPU/compiler combination. For example ../perl/Porting/bisect.pl --validate -le 'print "Hello from $]"' +If no testcase is specified, the default is to use F<t/TEST> to run +F<t/base/*.t> + =item * --check-args diff --git a/Porting/bisect.pl b/Porting/bisect.pl index d49223d047..8284005539 100755 --- a/Porting/bisect.pl +++ b/Porting/bisect.pl @@ -12,6 +12,9 @@ unshift @ARGV, '--help' unless GetOptions('start=s' => \$start, 'end=s' => \$end, validate => \$validate); +@ARGV = ('--', 'sh', '-c', 'cd t && ./perl TEST base/*.t') + if $validate && !@ARGV; + my $runner = $0; $runner =~ s/bisect\.pl/bisect-runner.pl/; @@ -63,11 +66,18 @@ sub validate { die "Runner returned $ret, not 0 for revision $commit" if $ret; system 'git clean -dxf </dev/null' and die; system 'git reset --hard HEAD </dev/null' and die; + return $commit; } if ($validate) { - validate $_ foreach 'blead', reverse @stable; - exit 0; + require Text::Wrap; + my @built = map {validate $_} 'blead', reverse @stable; + if (@built) { + print Text::Wrap::wrap("", "", "Successfully validated @built\n"); + exit 0; + } + print "Did not validate anything\n"; + exit 1; } my $git_version = `git --version`; |