summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-11-01 22:48:41 +0100
committerNicholas Clark <nick@ccl4.org>2011-11-01 22:48:41 +0100
commite2760528720bf060a1f8246c3c77820e4aed7448 (patch)
treed5bde2d352c055746a80f36c08fb21b511d59762
parentfc4401c6b354576e72009cd9eee271deca608281 (diff)
downloadperl-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-xPorting/bisect-runner.pl3
-rwxr-xr-xPorting/bisect.pl14
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`;