Log all test run result cases in native take-over
Warning: this does not work correctly with tests that soft fail, e.g. via a `CHECK` assertion. This is because the soft failures only update the child's `DeepState_TestFailed` global variable, but do not exit. What we will soon do is share memory with the child process, and derive the "test result" from that shared memeory.
This commit is contained in:
@@ -411,13 +411,25 @@ void DeepState_RunSavedTakeOverCases(jmp_buf env,
|
||||
if (WIFEXITED(wstatus)) {
|
||||
uint8_t status = WEXITSTATUS(wstatus);
|
||||
|
||||
if (status) {
|
||||
switch (status) {
|
||||
case DeepState_TestRunPass:
|
||||
DeepState_LogFormat(DeepState_LogInfo,
|
||||
"Passed: TakeOver test with data from `%s`",
|
||||
dp->d_name);
|
||||
break;
|
||||
case DeepState_TestRunFail:
|
||||
DeepState_LogFormat(DeepState_LogError,
|
||||
"Failed: TakeOver test with data from `%s`",
|
||||
dp->d_name);
|
||||
} else {
|
||||
DeepState_LogFormat(DeepState_LogInfo,
|
||||
"Passed: TakeOver test with data from `%s`",
|
||||
break;
|
||||
case DeepState_TestRunAbandon:
|
||||
DeepState_LogFormat(DeepState_LogError,
|
||||
"Abandoned: TakeOver test with data from `%s`",
|
||||
dp->d_name);
|
||||
break;
|
||||
default:
|
||||
DeepState_LogFormat(DeepState_LogError,
|
||||
"Unknown exit code from test with data from `%s`",
|
||||
dp->d_name);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user