summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-11-01 20:48:30 +0100
committerNicholas Clark <nick@ccl4.org>2011-11-01 22:22:57 +0100
commit3f14869bb44746c853564775631134b778f620d2 (patch)
treee78b71d90622fe7c7a7e0e08093f77a6c161819c
parentbfa52998a606e560121feb2d3ecadfb47ef08af0 (diff)
downloadperl-3f14869bb44746c853564775631134b778f620d2.tar.gz
In bisect.pl, use --start and --end to give ranges to --validate
This allows the user to specify a subset of revisions to test build.
-rwxr-xr-xPorting/bisect-runner.pl7
-rwxr-xr-xPorting/bisect.pl8
2 files changed, 12 insertions, 3 deletions
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl
index 7f9de33288..a701aa4a6c 100755
--- a/Porting/bisect-runner.pl
+++ b/Porting/bisect-runner.pl
@@ -387,9 +387,10 @@ Passing this to F<bisect.pl> will likely cause the bisect to fail badly.
--validate
-Test that all stable revisions can be built. Attempts to build I<blead>,
-I<v5.14.0> .. I<perl-5.002>. Stops at the first failure, without cleaning
-the checkout. Ignores I<--start> and I<--end>. Useful for validating a new
+Test that all stable revisions can be built. By default, attempts to build
+I<blead>, I<v5.14.0> .. I<perl-5.002>. Stops at the first failure, without
+cleaning the checkout. Use I<--start> to specify the earliest revision to
+test, I<--end> to specify the most recent. Useful for validating a new
OS/CPU/compiler combination. For example
../perl/Porting/bisect.pl --validate -e'print "Hello from $]\n"'
diff --git a/Porting/bisect.pl b/Porting/bisect.pl
index 8a6b5df736..d49223d047 100755
--- a/Porting/bisect.pl
+++ b/Porting/bisect.pl
@@ -49,6 +49,14 @@ die "This checkout is not clean - $modified modified or untracked file(s)"
sub validate {
my $commit = shift;
+ if (defined $start && `git rev-list -n1 $commit ^$start^` eq "") {
+ print "Skipping $commit, as it is earlier than $start\n";
+ return;
+ }
+ if (defined $end && `git rev-list -n1 $end ^$commit^` eq "") {
+ print "Skipping $commit, as it is more recent than $end\n";
+ return;
+ }
print "Testing $commit...\n";
system "git checkout $commit </dev/null" and die;
my $ret = system $^X, $runner, '--no-clean', @ARGV;