In bisect-runner.pl, fix a bug where a good "test_prep" build would skip.
authorNicholas Clark <nick@ccl4.org>
Mon, 3 Oct 2011 15:07:05 +0000 (17:07 +0200)
committerNicholas Clark <nick@ccl4.org>
Mon, 3 Oct 2011 15:07:05 +0000 (17:07 +0200)
The "skip"/continue logic was not aware that the build code could change
"test_prep" to "test-prep" or "test" on very old perls, and so was looking
for a file that did not exist, instead of ./perl, and then signaling a
"skip" because it could not find it.

Also fix a fencepost error for the -j test - 5.10.0 (inclusive) and later
are safe to build with paralllel make.

Porting/bisect-runner.pl

index 7746370..4f36ebe 100755 (executable)
@@ -442,7 +442,7 @@ system "make $j miniperl";
 
 if ($target ne 'miniperl') {
     # Nearly all parallel build issues fixed by 5.10.0. Untrustworthy before that.
-    $j = '' unless $major > 10;
+    $j = '' if $major < 10;
 
     if ($target eq 'test_prep') {
         if ($major < 8) {
@@ -457,7 +457,7 @@ if ($target ne 'miniperl') {
     system "make $j $target";
 }
 
-my $expected = $target eq 'test_prep' ? 'perl' : $target;
+my $expected = $target =~ /^test/ ? 'perl' : $target;
 my $missing_target = $expected =~ /perl$/ ? !-x $expected : !-r $expected;
 
 if ($options{'test-build'}) {
@@ -469,7 +469,7 @@ if ($options{'test-build'}) {
 match_and_exit($target) if $match;
 
 if (defined $options{'one-liner'}) {
-    my $exe = $target eq 'perl' || $target eq 'test_prep' ? 'perl' : 'miniperl';
+    my $exe = $target ne 'miniperl' ? 'perl' : 'miniperl';
     unshift @ARGV, "./$exe", '-Ilib', '-e', $options{'one-liner'};
 }