Skip to content

Commit

Permalink
Add --no-replay option.
Browse files Browse the repository at this point in the history
Turning this on disables test replay via single stepping if group
tests fail.

Better run log status of how replay is happening.

Improved status message in run log about watchdog timer
actuations to track down timeout oddities causing failures.
  • Loading branch information
bigtrak committed Mar 22, 2021
1 parent f941cec commit 4ca2d68
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
23 changes: 19 additions & 4 deletions scripts/build/Dyninst/testsuite.pm
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,28 @@ sub run {
"LD_LIBRARY_PATH=$paths:\$LD_LIBRARY_PATH " .
"./runTests -64 -all -log test.log -j$args->{'ntestjobs'} $limit 1>stdout.log 2>stderr.log"
);


## XXX do a better job here, otherwise
## dual watchdog messages, but at least tell the truth
# Being killed by the watchdog timer _should_ cause 'execute' to throw, but
# check it here explicitly just to be sure
die if _killed_by_watchdog("$base_dir/stderr.log");
if (_killed_by_watchdog("$base_dir/stderr.log")) {
$run_log->write("group test exceeded time limit, uncaught, forcing...");
die;
}
$run_log->write("Running in group mode succeeded, NO REPLAY NEEDED.\n");
} catch {
$run_log->write("Running in group mode failed. Running single-step mode.\n");
_run_single($paths, $args, $base_dir, $run_log);
## make sure we know it is this failure
if (_killed_by_watchdog("$base_dir/stderr.log")) {
$run_log->write("group test exceeded time limit, caught");
}
if ($args->{'replay'}) {
$run_log->write("Running in group mode failed. Running single-step mode.\n");
_run_single($paths, $args, $base_dir, $run_log);
}
else {
$run_log->write("Running in group mode failed, NO REPLAY.\n");
}
};
}

Expand Down
3 changes: 3 additions & 0 deletions scripts/build/build.pl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
'debug-mode' => 0, # undocumented debug mode
'limit' => undef, # change group limit
'root' => undef, # root directory name
'replay' => 1, # replay fails in single-step
);

GetOptions(\%args,
Expand All @@ -63,6 +64,7 @@
'sterile!', 'hostname=s', 'debug-mode',
'limit=i',
'root=s',
'replay!',
) or pod2usage(-exitval=>2);

if($args{'help'}) {
Expand Down Expand Up @@ -342,5 +344,6 @@ =head1 SYNOPSIS
--hostname Override the hostname provided by `uname`
--limit=n Change group test limit in testsuite.
--root=dir Set name/ID of root of test directory
--no-replay Turn off automatic replay of failed tests.
--help Print this help message
=cut

0 comments on commit 4ca2d68

Please sign in to comment.