diff --git a/scripts/build/Dyninst/testsuite.pm b/scripts/build/Dyninst/testsuite.pm index e279eb2b..1a2faa08 100644 --- a/scripts/build/Dyninst/testsuite.pm +++ b/scripts/build/Dyninst/testsuite.pm @@ -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"); + } }; } diff --git a/scripts/build/build.pl b/scripts/build/build.pl index 7c2d3626..83741a54 100644 --- a/scripts/build/build.pl +++ b/scripts/build/build.pl @@ -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, @@ -63,6 +64,7 @@ 'sterile!', 'hostname=s', 'debug-mode', 'limit=i', 'root=s', + 'replay!', ) or pod2usage(-exitval=>2); if($args{'help'}) { @@ -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