1.1 --- a/test/test-automation/runner.c Thu Jul 14 21:04:31 2011 +0300
1.2 +++ b/test/test-automation/runner.c Sun Jul 17 11:17:40 2011 +0300
1.3 @@ -496,13 +496,7 @@
1.4 */
1.5 TestCaseSetUpFp
1.6 LoadTestSetUpFunction(void *suite) {
1.7 - TestCaseSetUpFp testSetUp = (TestCaseSetUpFp) SDL_LoadFunction(suite, "SetUp");
1.8 - if(testSetUp == NULL) {
1.9 - fprintf(stderr, "Loading SetUp function failed, testSetUp == NULL\n");
1.10 - fprintf(stderr, "%s\n", SDL_GetError());
1.11 - }
1.12 -
1.13 - return testSetUp;
1.14 + return (TestCaseSetUpFp) SDL_LoadFunction(suite, "SetUp");
1.15 }
1.16
1.17
1.18 @@ -516,13 +510,7 @@
1.19 */
1.20 TestCaseTearDownFp
1.21 LoadTestTearDownFunction(void *suite) {
1.22 - TestCaseTearDownFp testTearDown = (TestCaseTearDownFp) SDL_LoadFunction(suite, "TearDown");
1.23 - if(testTearDown == NULL) {
1.24 - fprintf(stderr, "Loading TearDown function failed, testTearDown == NULL\n");
1.25 - fprintf(stderr, "%s\n", SDL_GetError());
1.26 - }
1.27 -
1.28 - return testTearDown;
1.29 + return (TestCaseTearDownFp) SDL_LoadFunction(suite, "TearDown");
1.30 }
1.31
1.32
1.33 @@ -585,6 +573,23 @@
1.34 }
1.35
1.36
1.37 +/*!
1.38 + * Kills test that hungs. Test hungs when its execution
1.39 + * takes longer than timeout specified for it.
1.40 + *
1.41 + * When test will be killed SIG_ALRM will be triggered and
1.42 + * it'll call this function which kills the test process.
1.43 + *
1.44 + * Note: if runner is executed with --in-proc then hung tests
1.45 + * can't be killed
1.46 + *
1.47 + * \param signum
1.48 + */
1.49 +void KillHungTest(int signum) {
1.50 + exit(TEST_RESULT_KILLED);
1.51 +}
1.52 +
1.53 +
1.54 /*
1.55 * Execute a test. Loads the test, executes it and
1.56 * returns the tests return value to the caller.
1.57 @@ -614,21 +619,6 @@
1.58 return testItem->quitTestEnvironment();
1.59 }
1.60
1.61 -/*!
1.62 - * Kills test that hungs. Test hungs when its execution
1.63 - * takes longer than timeout specified for it.
1.64 - *
1.65 - * When test will be killed SIG_ALRM will be triggered and
1.66 - * it'll call this function which kills the test process.
1.67 - *
1.68 - * Note: if runner is executed with --in-proc then hung tests
1.69 - * can't be killed
1.70 - *
1.71 - * \param signum
1.72 - */
1.73 -void KillHungTest(int signum) {
1.74 - exit(TEST_RESULT_KILLED);
1.75 -}
1.76
1.77 /*!
1.78 * Sets up a test case. Decideds wheter the test will