Update test.c
authorBrian Aker <brian@gaz>
Sat, 19 Dec 2009 02:25:46 +0000 (18:25 -0800)
committerBrian Aker <brian@gaz>
Sat, 19 Dec 2009 02:25:46 +0000 (18:25 -0800)
tests/test.c

index 44f18eea9f7da4e577ee02b526a6766c933536d0..a10cc47655097d86383328880d5257e421c8d02b 100644 (file)
@@ -19,7 +19,6 @@
 #include <unistd.h>
 #include <time.h>
 #include <fnmatch.h>
-#include "server.h"
 
 #include "test.h"
 
@@ -172,7 +171,7 @@ int main(int argc, char *argv[])
       }
 
 
-      if (next->pre)
+      if (next->pre && world.runner->pre)
       {
         return_code= world.runner->pre(next->pre, world_ptr);
 
@@ -187,9 +186,9 @@ int main(int argc, char *argv[])
       gettimeofday(&end_time, NULL);
       load_time= timedif(end_time, start_time);
 
-      if (next->post)
+      if (next->post && world.runner->post)
       {
-        (void) world.runner->pre(next->pre, world_ptr);
+        (void) world.runner->post(next->post, world_ptr);
       }
 
       if (world.post_run)