Harness kills hung tests (won't work with --in-proc option).
Added result description to test logs (tells why test failed, such as exceeding its timeout).
This commit is contained in:
parent
4790fd63e3
commit
7de8abe0c4
7 changed files with 110 additions and 30 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "logger_helpers.h"
|
||||
#include "plain_logger.h"
|
||||
#include "SDL_test.h"
|
||||
|
||||
static int indentLevel;
|
||||
|
||||
|
@ -88,17 +89,25 @@ void
|
|||
PlainTestEnded(const char *testName, const char *suiteName,
|
||||
int testResult, time_t endTime, double totalRuntime)
|
||||
{
|
||||
if(testResult) {
|
||||
if(testResult == 2) {
|
||||
Output(--indentLevel, "%s: failed -> no assert", testName);
|
||||
}
|
||||
else if(testResult == 3) {
|
||||
Output(--indentLevel, "%s: skipped", testName);
|
||||
} else {
|
||||
switch(testResult) {
|
||||
case TEST_RESULT_PASS:
|
||||
Output(--indentLevel, "%s: ok", testName);
|
||||
break;
|
||||
case TEST_RESULT_FAILURE:
|
||||
Output(--indentLevel, "%s: failed", testName);
|
||||
}
|
||||
} else {
|
||||
Output(--indentLevel, "%s: ok", testName);
|
||||
break;
|
||||
case TEST_RESULT_NO_ASSERT:
|
||||
Output(--indentLevel, "%s: failed -> no assert", testName);
|
||||
break;
|
||||
case TEST_RESULT_SKIPPED:
|
||||
Output(--indentLevel, "%s: skipped", testName);
|
||||
break;
|
||||
case TEST_RESULT_KILLED:
|
||||
Output(--indentLevel, "%s: killed, exceeded timeout", testName);
|
||||
break;
|
||||
case TEST_RESULT_SETUP_FAILURE:
|
||||
Output(--indentLevel, "%s: killed, setup failure", testName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue