Added timeout to TestCaseReference.
authorMarkus Kauppila <markus.kauppila@gmail.com>
Sat, 11 Jun 2011 21:37:28 +0300
changeset 5698 811b5480850e
parent 5697 0dfe2e85dfd1
child 5699 526cb9b382d9
Added timeout to TestCaseReference.
test/test-automation/SDL_test.h
test/test-automation/testdummy/testdummy.c
test/test-automation/testrect/testrect.c
--- a/test/test-automation/SDL_test.h	Sat Jun 11 08:11:03 2011 -0700
+++ b/test/test-automation/SDL_test.h	Sat Jun 11 21:37:28 2011 +0300
@@ -35,10 +35,16 @@
  * Holds information about a test case
  */
 typedef struct TestCaseReference {
-	char *name;         /*!< "Func2Stress" */
-	char *description;  /*!< "This test beats the crap out of func2()" */
-	int enabled;       /*!< Set to TEST_ENABLED or TEST_DISABLED */
-	long requirements;  /*!< Set to TEST_REQUIRES_OPENGL, TEST_REQUIRES_AUDIO, ... */
+	/*!< "Func2Stress" */
+	char *name;
+	/*!< "This test beats the crap out of func2()" */
+	char *description;
+	/*!< Set to TEST_ENABLED or TEST_DISABLED */
+	int enabled;
+	/*!< Set to TEST_REQUIRES_OPENGL, TEST_REQUIRES_AUDIO, ... */
+	long requirements;
+	/*<! Timeout value in seconds. If exceeded runner will kill the test. 0 means infinite time */
+	long timeout;
 } TestCaseReference;
 
 /*! \fn _TestCaseInit
--- a/test/test-automation/testdummy/testdummy.c	Sat Jun 11 08:11:03 2011 -0700
+++ b/test/test-automation/testdummy/testdummy.c	Sat Jun 11 21:37:28 2011 +0300
@@ -37,13 +37,13 @@
 
 /* Test case references */
 static const TestCaseReference test1 =
-		(TestCaseReference){ "dummycase1", "description", TEST_ENABLED, 0 };
+		(TestCaseReference){ "dummycase1", "description", TEST_ENABLED, 0, 0};
 
 static const TestCaseReference test2 =
-		(TestCaseReference){ "dummycase2", "description", TEST_ENABLED, 0 };
+		(TestCaseReference){ "dummycase2", "description", TEST_ENABLED, 0, 0};
 
 static const TestCaseReference test3 =
-		(TestCaseReference){ "dummycase3", "description", TEST_ENABLED, 0 };
+		(TestCaseReference){ "dummycase3", "description", TEST_ENABLED, 0, 0};
 
 /* Test suite */
 extern const TestCaseReference *testSuite[] =  {
--- a/test/test-automation/testrect/testrect.c	Sat Jun 11 08:11:03 2011 -0700
+++ b/test/test-automation/testrect/testrect.c	Sat Jun 11 21:37:28 2011 +0300
@@ -10,7 +10,7 @@
 
 /* Test cases */
 static const TestCaseReference test1 =
-		(TestCaseReference){ "rect_testIntersectRectAndLine", "description", TEST_ENABLED, 0 };
+		(TestCaseReference){ "rect_testIntersectRectAndLine", "description", TEST_ENABLED, 0, 0 };
 
 /* Test suite */
 extern const TestCaseReference *testSuite[] =  {