Skip to content

Commit

Permalink
testrunner.pl: unbreak @cassini_overrides (fixes --valgrind)
Browse files Browse the repository at this point in the history
  • Loading branch information
elliefm committed Apr 28, 2017
1 parent 1036697 commit bb9e8ad
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions testrunner.pl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
my $keep_going = 1;
my $log_directory;
my @names;
my $jobs = Cassandane::Cassini->instance()->val('cassandane', 'maxworkers', undef);

# This disgusting hack makes Test::Unit report a useful stack trace for
# it's assert failures instead of just a file name and line number.
Expand Down Expand Up @@ -223,13 +222,15 @@ sub usage
}
elsif ($a eq '-j' || $a eq '--jobs')
{
$jobs = shift;
usage unless defined $jobs;
my $jobs = 0 + shift;
usage unless $jobs > 0;
push(@cassini_overrides, ['cassandane', 'maxworkers', $jobs]);
}
elsif ($a =~ m/^-j(\d+)$/)
{
$jobs = 0 + $1;
my $jobs = 0 + $1;
usage unless $jobs > 0;
push(@cassini_overrides, ['cassandane', 'maxworkers', $jobs]);
}
elsif ($a eq '-L' || $a eq '--log-directory')
{
Expand Down Expand Up @@ -273,7 +274,7 @@ sub usage

my $plan = Cassandane::Unit::TestPlan->new(
keep_going => $keep_going,
maxworkers => $jobs,
maxworkers => $cassini->val('cassandane', 'maxworkers'),
log_directory => $log_directory,
);

Expand Down

0 comments on commit bb9e8ad

Please sign in to comment.