diff --git a/test/test_runner.c b/test/test_runner.c index c2d3f66d2..eb5d12c77 100644 --- a/test/test_runner.c +++ b/test/test_runner.c @@ -187,7 +187,10 @@ void CB2_TestRunner(void) } break; case TEST_RESULT_PASS: result = "PASS"; break; - case TEST_RESULT_SKIP: result = "SKIP"; break; + case TEST_RESULT_SKIP: + result = "ASSUMPTION_FAIL"; + color = "\e[33m"; + break; case TEST_RESULT_INVALID: result = "INVALID"; break; case TEST_RESULT_ERROR: result = "ERROR"; break; case TEST_RESULT_TIMEOUT: result = "TIMEOUT"; break; @@ -196,6 +199,8 @@ void CB2_TestRunner(void) if (gTestRunnerState.result == TEST_RESULT_PASS) MgbaPrintf_(":P%s%s\e[0m", color, result); + else if (gTestRunnerState.result == TEST_RESULT_SKIP) + MgbaPrintf_(":A%s%s\e[0m", color, result); else if (gTestRunnerState.expectedResult == gTestRunnerState.result) MgbaPrintf_(":K%s%s\e[0m", color, result); else diff --git a/tools/mgba-rom-test-hydra/main.c b/tools/mgba-rom-test-hydra/main.c index 107ca339b..75c705f17 100644 --- a/tools/mgba-rom-test-hydra/main.c +++ b/tools/mgba-rom-test-hydra/main.c @@ -44,6 +44,8 @@ struct Runner char *output_buffer; int passes; int knownFails; + int assumptionFails; + int fails; int results; }; @@ -80,12 +82,17 @@ static void handle_read(struct Runner *runner) break; case 'P': - case 'F': + runner->passes++; + goto add_to_results; case 'K': - if (soc[1] == 'P') - runner->passes++; - else if (soc[1] == 'K') - runner->knownFails++; + runner->knownFails++; + goto add_to_results; + case 'A': + runner->assumptionFails++; + goto add_to_results; + case 'F': + runner->fails++; +add_to_results: runner->results++; soc += 2; fprintf(stdout, "%s: ", runner->test_name); @@ -420,6 +427,8 @@ int main(int argc, char *argv[]) int exit_code = 0; int passes = 0; int knownFails = 0; + int assumptionFails = 0; + int fails = 0; int results = 0; for (int i = 0; i < nrunners; i++) { @@ -435,6 +444,8 @@ int main(int argc, char *argv[]) exit_code = WEXITSTATUS(wstatus); passes += runners[i].passes; knownFails += runners[i].knownFails; + assumptionFails += runners[i].assumptionFails; + fails += runners[i].fails; results += runners[i].results; } @@ -445,11 +456,13 @@ int main(int argc, char *argv[]) else { fprintf(stdout, "\n- Tests TOTAL: %d\n", results); - fprintf(stdout, "- Tests \e[32mPASSED: \e[0m %d\n", passes); + fprintf(stdout, "- Tests \e[32mPASSED\e[0m: %d\n", passes); if (knownFails > 0) - fprintf(stdout, "- Tests \e[33mKNOWN_FAILING:\e[0m %d\n", knownFails); - if (passes + knownFails < results) - fprintf(stdout, "- Tests \e[31mFAILED: \e[0m %d\n", results - passes - knownFails); + fprintf(stdout, "- Tests \e[33mKNOWN_FAILING\e[0m: %d\n", knownFails); + if (fails > 0) + fprintf(stdout, "- Tests \e[31mFAILED\e[0m : %d\n", fails); + if (assumptionFails > 0) + fprintf(stdout, "- \e[33mASSUMPTIONS_FAILED\e[0m: %d\n", assumptionFails); } fprintf(stdout, "\n");