From 5c5d93aa57efbffdd74b651e3794bc80d687911d Mon Sep 17 00:00:00 2001 From: Markus Kauppila Date: Mon, 18 Jul 2011 14:41:01 +0300 Subject: [PATCH] Harness warns about tests that request timeout when it's not available. --- test/test-automation/plain_logger.c | 9 +-------- test/test-automation/runner.c | 3 +++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/test/test-automation/plain_logger.c b/test/test-automation/plain_logger.c index 7ba24a308..e4f492e1e 100644 --- a/test/test-automation/plain_logger.c +++ b/test/test-automation/plain_logger.c @@ -2,10 +2,6 @@ #ifndef _PLAIN_LOGGER #define _PLAIN_LOGGER -#include - -#include - #include "logger_helpers.h" #include "plain_logger.h" #include "SDL_test.h" @@ -21,13 +17,11 @@ static int indentLevel; int Output(const int currentIndentLevel, const char *message, ...) { - int ident = 0; for( ; ident < currentIndentLevel; ++ident) { fprintf(stdout, " "); // \todo make configurable? } - char buffer[1024]; memset(buffer, 0, 1024); @@ -38,7 +32,6 @@ Output(const int currentIndentLevel, const char *message, ...) va_end(list); - fprintf(stdout, "%s\n", buffer); fflush(stdout); } @@ -145,7 +138,7 @@ PlainAssertSummary(int numAsserts, int numAssertsFailed, int numAssertsPass, tim void PlainLog(const char *logMessage, time_t eventTime) { - Output(indentLevel, "%s %d", logMessage, TimestampToString(eventTime)); + Output(indentLevel, "%s", logMessage); } #endif diff --git a/test/test-automation/runner.c b/test/test-automation/runner.c index a9d9e8617..ffd55c5bd 100644 --- a/test/test-automation/runner.c +++ b/test/test-automation/runner.c @@ -632,6 +632,9 @@ ExecuteTest(TestCase *testItem) { int retVal = -1; if(execute_inproc) { + if(testItem->timeout > 0) { + Log("Test asked for timeout which is not supported.", time(0)); + } retVal = RunTest(testItem); } else { int childpid = fork();