In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/8fbd1c2c3d469d715d854ea1a69c582c21187f1f?hp=768cd71466d5db450300d1eb0e7a7d9f9b6e0894>

- Log -----------------------------------------------------------------
commit 8fbd1c2c3d469d715d854ea1a69c582c21187f1f
Author: David Mitchell <[email protected]>
Date:   Mon Dec 1 23:15:39 2014 +0000

    Porting/bench.pl: handle perl select with --write
    
    The cmd-line opts that include a perl, --norm and --sort,
    didn't work correctly in the presence of --read, which by-passed
    the code that processes the list of perls.
-----------------------------------------------------------------------

Summary of changes:
 Porting/bench.pl | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/Porting/bench.pl b/Porting/bench.pl
index 039997c..2145d70 100755
--- a/Porting/bench.pl
+++ b/Porting/bench.pl
@@ -457,7 +457,6 @@ sub select_a_perl {
 
 
 # Validate the list of perl=label on the command line.
-# Also validate $OPTS{norm}, $OPTS{sort};
 # Return a list of [ exe, label ] pairs.
 
 sub process_perls {
@@ -469,17 +468,11 @@ sub process_perls {
         die "Error: unable to execute '$perl': $r" if $r ne "ok\n";
         push @results, [ $perl, $label ];
     }
-
-    $OPTS{norm} = select_a_perl($OPTS{norm}, \@results, "--norm");
-    if (defined $OPTS{'sort-perl'}) {
-        $OPTS{'sort-perl'} =
-                select_a_perl($OPTS{'sort-perl'}, \@results, "--sort");
-    }
-
     return @results;
 }
 
 
+
 # Return a string containing perl test code wrapped in a loop
 # that runs $ARGV[0] times
 
@@ -600,9 +593,20 @@ sub do_grind {
             if defined $OPTS{bisect} and keys %$tests != 1;
 
         $perls = [ process_perls(@$perl_args) ];
+
+
         $results = grind_run($tests, $perls, $loop_counts);
     }
 
+    # now that we have a list of perls, use it to process the
+    # 'perl' component of the --norm and --sort args
+
+    $OPTS{norm} = select_a_perl($OPTS{norm}, $perls, "--norm");
+    if (defined $OPTS{'sort-perl'}) {
+        $OPTS{'sort-perl'} =
+                select_a_perl($OPTS{'sort-perl'}, $perls, "--sort");
+    }
+
     if (defined $OPTS{write}) {
         my $json = JSON::PP::encode_json({
                     version      => $FORMAT_VERSION,

--
Perl5 Master Repository

Reply via email to