Skip to content

Commit aeb0b94

Browse files
author
Geoffrey Broadwell
committed
Add comments to make explicit why some callers of run_tests() or time_all_compilers() catch exceptions, and some don't
1 parent 70fb97c commit aeb0b94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

timeall

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,13 @@ sub run_all_tests {
317317
my $empty_test = $TESTS{e}[0];
318318

319319
say "Measuring startup times ...";
320+
# If user aborts now, don't bother catching it; normal testing hasn't begun
320321
my $times = time_all_compilers($empty_test, $startup_runs, 0, $enough_time, 0, $opt->{verbose});
321322
my $startup = best_times($times);
322323
$startup->{$_} = $startup->{$_}{1}{time} for keys %$startup;
323324

324325
my @results;
326+
# Catch user aborts so that results for completed tests can be returned
325327
eval { run_tests(\@TESTS, \@results, $startup, $runs, $overhead_runs, $enough_time, $scale_points, $opt->{verbose}) };
326328
warn "\n$@\n" if $@;
327329
return (\@results, $startup);
@@ -338,6 +340,8 @@ sub run_tests {
338340
my $name = $test->{name};
339341
say "$testnum/$testcount: Testing $name ...";
340342

343+
# Let user aborts fall out to run_all_tests() so that the last test
344+
# timed won't have partial (and possibly misleading) timing data
341345
my $raw_times = time_all_compilers($test, $runs, $overhead_runs, $enough_time, $min_scaling_points, $verbose, $startup);
342346
my $best = best_times($raw_times);
343347
push @$results, {

0 commit comments

Comments
 (0)