diff options
author | David Mitchell <davem@iabyn.com> | 2017-06-10 14:54:11 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-06-21 10:56:23 +0100 |
commit | d9b91f7969bc252f244dfaf28f31980e50fc7fe5 (patch) | |
tree | 903e0b06fcbb7268ba56439e95a74d2b5ab14dc4 /Porting | |
parent | 6568b26dddaf1bc89610d859ebe908bebdeb714c (diff) | |
download | perl-d9b91f7969bc252f244dfaf28f31980e50fc7fe5.tar.gz |
Porting/bench.pl: fix broken --bisect option
This option had bit-rotted: checks for the right number of perl executables
weren't taking account of --bisect.
Fix, and add tests.
Diffstat (limited to 'Porting')
-rwxr-xr-x | Porting/bench.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Porting/bench.pl b/Porting/bench.pl index 333835e3d9..bf1e32beb3 100755 --- a/Porting/bench.pl +++ b/Porting/bench.pl @@ -740,7 +740,7 @@ sub do_grind { my @run_perls= process_puts($perls, @$perl_args); push @$perls, @run_perls; die "Error: Not enough perls to run a report, and --write not specified.\n" - if @$perls < 2 and !$OPTS{write}; + if @$perls < 2 and !($OPTS{write} || $OPTS{bisect}); $results = grind_run($tests, $order, \@run_perls, $loop_counts, $results); } @@ -776,7 +776,7 @@ sub do_grind { close $out or die "Error: closing file '$OPTS{write}': $!\n"; } if (!$OPTS{write} or $OPTS{show}) { - if (@$perls < 2 && !$OPTS{raw}) { + if (@$perls < 2 && !($OPTS{raw} || $OPTS{bisect})) { die "Error: need more than one perl to do a report.\n"; } my ($processed, $averages) = |