about summary refs log tree commit diff
path: root/test-skeleton.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-skeleton.c')
-rw-r--r--test-skeleton.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/test-skeleton.c b/test-skeleton.c
index 497adbe5ba..e4fed67ae3 100644
--- a/test-skeleton.c
+++ b/test-skeleton.c
@@ -158,13 +158,18 @@ main (int argc, char *argv[])
   /* Make sure we see all message, even those on stdout.  */
   setvbuf (stdout, NULL, _IONBF, 0);
 
+  /* make sure temporary files are deleted.  */
+  atexit (delete_temp_files);
+
+  /* Call the initializing function, if one is available.  */
+#ifdef PREPARE
+  PREPARE (argc, argv);
+#endif
+
   /* If we are not expected to fork run the function immediately.  */
   if (direct)
     return TEST_FUNCTION;
 
-  /* make sure temporary files are deleted.  */
-  atexit (delete_temp_files);
-
   /* Set up the test environment:
      - prevent core dumps
      - set up the timer