Harness warns about tests that request timeout when it's not
authorMarkus Kauppila <markus.kauppila@gmail.com>
Mon, 18 Jul 2011 14:41:01 +0300
changeset 5767 36f7413f460f
parent 5766 8cc2ae74cd83
child 5768 40d331dc9c9e
Harness warns about tests that request timeout when it's not available.
test/test-automation/plain_logger.c
test/test-automation/runner.c
--- a/test/test-automation/plain_logger.c	Sun Jul 17 20:59:34 2011 -0700
+++ b/test/test-automation/plain_logger.c	Mon Jul 18 14:41:01 2011 +0300
@@ -2,10 +2,6 @@
 #ifndef _PLAIN_LOGGER
 #define _PLAIN_LOGGER
 
-#include <stdio.h>
-
-#include <SDL/SDL.h>
-
 #include "logger_helpers.h"
 #include "plain_logger.h"
 #include "SDL_test.h"
@@ -21,13 +17,11 @@
 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 @@
 
 	va_end(list);
 
-
 	fprintf(stdout, "%s\n", buffer);
 	fflush(stdout);
 }
@@ -145,7 +138,7 @@
 void
 PlainLog(const char *logMessage, time_t eventTime)
 {
-	Output(indentLevel, "%s %d", logMessage, TimestampToString(eventTime));
+	Output(indentLevel, "%s", logMessage);
 }
 
 #endif
--- a/test/test-automation/runner.c	Sun Jul 17 20:59:34 2011 -0700
+++ b/test/test-automation/runner.c	Mon Jul 18 14:41:01 2011 +0300
@@ -632,6 +632,9 @@
 	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();