SafeCleanup::reset();
std::string testReason;
+ auto pid = getpid();
TestResult::FailStatus testStatus = TryCatch(std::bind(&TestCase::Test, testCase),
testReason);
+ if (getpid() != pid) {
+ fprintf(stderr, "Child process did not die, exiting with 1. Reason: %s", testReason.c_str());
+ // Child process failed by throwing exception instead of dying, we need to exit - only the
+ // parent (original) process should proceed with running the tests.
+ _exit(1);
+ }
testReason = getConcatedFailReason(testReason);
std::string finishReason;
TestResult::FailStatus finishStatus = TryCatch(std::bind(&TestCase::Finish, testCase),