This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #133136] bisect runner
authorKarl Williamson <khw@cpan.org>
Wed, 25 Apr 2018 22:28:37 +0000 (16:28 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 30 Apr 2018 21:11:07 +0000 (15:11 -0600)
bisect runner is supposed to keep going if the particular revision being
tested fails to compile.  But it wasn't.

Nicholas graciously diagnosed the problem.  When the enhancement for
testing when a module got broken, the code to do so was placed before
the check to see if the build for this revision crashed.  It's simply a
matter of moving that module code to after that check.

Porting/bisect-runner.pl

index 6f9fd9d..0031921 100755 (executable)
@@ -1514,10 +1514,36 @@ if ($target ne 'miniperl') {
     system "$options{make} $j $real_target </dev/null";
 }
 
-# Testing a cpan module? See if it will install
-my $just_testing;
-if (my $mod_opt = $options{module} || $options{'with-module'}
+my $expected_file_found = $expected_file =~ /perl$/
+    ? -x $expected_file : -r $expected_file;
+
+if ($expected_file_found && $expected_file eq 't/perl') {
+    # Check that it isn't actually pointing to ../miniperl, which will happen
+    # if the sanity check ./miniperl -Ilib -MExporter -e '<?>' fails, and
+    # Makefile tries to run minitest.
+
+    # Of course, helpfully sometimes it's called ../perl, other times .././perl
+    # and who knows if that list is exhaustive...
+    my ($dev0, $ino0) = stat 't/perl';
+    my ($dev1, $ino1) = stat 'perl';
+    unless (defined $dev0 && defined $dev1 && $dev0 == $dev1 && $ino0 == $ino1) {
+        undef $expected_file_found;
+        my $link = readlink $expected_file;
+        warn "'t/perl' => '$link', not 'perl'";
+        die_255("Could not realink t/perl: $!") unless defined $link;
+    }
+}
+
+my $just_testing = 0;
+
+if ($options{'test-build'}) {
+    report_and_exit($expected_file_found, 'could build', 'could not build',
+                    $real_target);
+} elsif (!$expected_file_found) {
+    skip("could not build $real_target");
+} elsif (my $mod_opt = $options{module} || $options{'with-module'}
                || ($just_testing++, $options{'test-module'})) {
+  # Testing a cpan module? See if it will install
   # First we need to install this perl somewhere
   system_or_die('./installperl');
 
@@ -1580,33 +1606,6 @@ if (my $mod_opt = $options{module} || $options{'with-module'}
   }
 }
 
-my $expected_file_found = $expected_file =~ /perl$/
-    ? -x $expected_file : -r $expected_file;
-
-if ($expected_file_found && $expected_file eq 't/perl') {
-    # Check that it isn't actually pointing to ../miniperl, which will happen
-    # if the sanity check ./miniperl -Ilib -MExporter -e '<?>' fails, and
-    # Makefile tries to run minitest.
-
-    # Of course, helpfully sometimes it's called ../perl, other times .././perl
-    # and who knows if that list is exhaustive...
-    my ($dev0, $ino0) = stat 't/perl';
-    my ($dev1, $ino1) = stat 'perl';
-    unless (defined $dev0 && defined $dev1 && $dev0 == $dev1 && $ino0 == $ino1) {
-        undef $expected_file_found;
-        my $link = readlink $expected_file;
-        warn "'t/perl' => '$link', not 'perl'";
-        die_255("Could not realink t/perl: $!") unless defined $link;
-    }
-}
-
-if ($options{'test-build'}) {
-    report_and_exit($expected_file_found, 'could build', 'could not build',
-                    $real_target);
-} elsif (!$expected_file_found) {
-    skip("could not build $real_target");
-}
-
 match_and_exit($real_target, @ARGV) if $match;
 
 if (defined $options{'one-liner'}) {