Commit c9ca0a46 authored by Markus Kauppila's avatar Markus Kauppila

Fixed logging noise coming from unimplemented optional test

suite functions SetUp and TearDown.
parent 254a8168
...@@ -496,13 +496,7 @@ LoadTestCaseFunction(void *suite, char *testName) ...@@ -496,13 +496,7 @@ LoadTestCaseFunction(void *suite, char *testName)
*/ */
TestCaseSetUpFp TestCaseSetUpFp
LoadTestSetUpFunction(void *suite) { LoadTestSetUpFunction(void *suite) {
TestCaseSetUpFp testSetUp = (TestCaseSetUpFp) SDL_LoadFunction(suite, "SetUp"); return (TestCaseSetUpFp) SDL_LoadFunction(suite, "SetUp");
if(testSetUp == NULL) {
fprintf(stderr, "Loading SetUp function failed, testSetUp == NULL\n");
fprintf(stderr, "%s\n", SDL_GetError());
}
return testSetUp;
} }
...@@ -516,13 +510,7 @@ LoadTestSetUpFunction(void *suite) { ...@@ -516,13 +510,7 @@ LoadTestSetUpFunction(void *suite) {
*/ */
TestCaseTearDownFp TestCaseTearDownFp
LoadTestTearDownFunction(void *suite) { LoadTestTearDownFunction(void *suite) {
TestCaseTearDownFp testTearDown = (TestCaseTearDownFp) SDL_LoadFunction(suite, "TearDown"); return (TestCaseTearDownFp) SDL_LoadFunction(suite, "TearDown");
if(testTearDown == NULL) {
fprintf(stderr, "Loading TearDown function failed, testTearDown == NULL\n");
fprintf(stderr, "%s\n", SDL_GetError());
}
return testTearDown;
} }
...@@ -585,6 +573,23 @@ LoadCountFailedAssertsFunction(void *suite) { ...@@ -585,6 +573,23 @@ LoadCountFailedAssertsFunction(void *suite) {
} }
/*!
* Kills test that hungs. Test hungs when its execution
* takes longer than timeout specified for it.
*
* When test will be killed SIG_ALRM will be triggered and
* it'll call this function which kills the test process.
*
* Note: if runner is executed with --in-proc then hung tests
* can't be killed
*
* \param signum
*/
void KillHungTest(int signum) {
exit(TEST_RESULT_KILLED);
}
/* /*
* Execute a test. Loads the test, executes it and * Execute a test. Loads the test, executes it and
* returns the tests return value to the caller. * returns the tests return value to the caller.
...@@ -614,21 +619,6 @@ RunTest(TestCase *testItem) { ...@@ -614,21 +619,6 @@ RunTest(TestCase *testItem) {
return testItem->quitTestEnvironment(); return testItem->quitTestEnvironment();
} }
/*!
* Kills test that hungs. Test hungs when its execution
* takes longer than timeout specified for it.
*
* When test will be killed SIG_ALRM will be triggered and
* it'll call this function which kills the test process.
*
* Note: if runner is executed with --in-proc then hung tests
* can't be killed
*
* \param signum
*/
void KillHungTest(int signum) {
exit(TEST_RESULT_KILLED);
}
/*! /*!
* Sets up a test case. Decideds wheter the test will * Sets up a test case. Decideds wheter the test will
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment