From b29812e40ba60de7389b04c3dcf69dfe653cd951 Mon Sep 17 00:00:00 2001 From: seelabs Date: Fri, 4 Dec 2020 11:32:25 -0500 Subject: [PATCH] Fix double counting unit test failures: Unit tests are counting test failures, process crashes, and process exit code failures in the count. Since a failing tests causes the process exit code to return failure, we get extra counts. This patch removes process exit code failures from the count. --- src/ripple/app/main/Main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ripple/app/main/Main.cpp b/src/ripple/app/main/Main.cpp index 6b767812de..16c89d4490 100644 --- a/src/ripple/app/main/Main.cpp +++ b/src/ripple/app/main/Main.cpp @@ -297,6 +297,7 @@ runUnitTests( boost::process::exe = exe_name, boost::process::args = args); int bad_child_exits = 0; + int terminated_child_exits = 0; for (auto& c : children) { try @@ -309,10 +310,11 @@ runUnitTests( { // wait throws if process was terminated with a signal ++bad_child_exits; + ++terminated_child_exits; } } - parent_runner.add_failures(bad_child_exits); + parent_runner.add_failures(terminated_child_exits); anyMissing(parent_runner, multi_selector(pattern)); if (parent_runner.any_failed() || bad_child_exits)