mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Detect when a unit test child process crashes (RIPD-1592):
When a test suite starts and ends, it informs the parent process. If the parent has received a start message without a matching end message it reports that a child may have crashed in that suite.
This commit is contained in:
@@ -229,9 +229,17 @@ static int runUnitTests(
|
||||
int bad_child_exits = 0;
|
||||
for(auto& c : children)
|
||||
{
|
||||
c.wait();
|
||||
if (c.exit_code())
|
||||
try
|
||||
{
|
||||
c.wait();
|
||||
if (c.exit_code())
|
||||
++bad_child_exits;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// wait throws if process was terminated with a signal
|
||||
++bad_child_exits;
|
||||
}
|
||||
}
|
||||
|
||||
if (parent_runner.any_failed() || bad_child_exits)
|
||||
|
||||
Reference in New Issue
Block a user