Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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).
  • Loading branch information
mkauppila committed Jul 13, 2011
1 parent f7f5009 commit bbe8e9cbe43e5d0846229241b37f4f948449606d

File 3 of 7 in bbe8e9c

@@ -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) {
switch(testResult) {
case TEST_RESULT_PASS:
Output(--indentLevel, "%s: ok", testName);
break;
case TEST_RESULT_FAILURE:
Output(--indentLevel, "%s: failed", testName);
break;
case TEST_RESULT_NO_ASSERT:
Output(--indentLevel, "%s: failed -> no assert", testName);
}
else if(testResult == 3) {
break;
case TEST_RESULT_SKIPPED:
Output(--indentLevel, "%s: skipped", testName);
} else {
Output(--indentLevel, "%s: failed", testName);
}
} else {
Output(--indentLevel, "%s: ok", 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;
}
}

0 comments on commit bbe8e9c

Please sign in to comment.