Index: trunk/psLib/test/psTest.c
===================================================================
--- trunk/psLib/test/psTest.c	(revision 526)
+++ trunk/psLib/test/psTest.c	(revision 538)
@@ -11,5 +11,11 @@
 //
 
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
 #include "psTest.h"
+#include "psAbort.h"
 
 #define HEADER_TOP    "/----------------------------- TESTPOINT --------------------------------\\\n"
@@ -18,5 +24,40 @@
 #define HEADER_BOTTOM "\\------------------------------------------------------------------------/\n\n"
 
-void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName)
+bool p_runTestSuite(FILE *fp, const char* testPointFile, const char* packageName, testDescription tests[])
+{
+    bool failed = false;
+
+    for (int index=0; tests[index].fcn != NULL; index++) {
+        failed = failed || p_runTest(fp,testPointFile,packageName,tests[index].testPointName,
+                                     tests[index].fcn,tests[index].expectedReturn);
+    }
+    return failed;
+}
+
+bool p_runTest(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
+               testFcn fcn, int expectedReturn)
+{
+    int childReturn = 0;
+    pid_t child;
+
+    p_printPositiveTestHeader(fp,testPointFile,packageName,testPointName);
+
+    child = fork();
+    if (child == 0) {                   // I am the child process, run the test
+        exit(fcn());
+    } else if (child < 0) {
+        psAbort(testPointFile,"Couldn't fork a process to run a negative test (%s|%s)", packageName,
+                testPointName);
+    }
+
+    wait(&childReturn);
+
+    p_printFooter(fp,testPointFile,packageName,testPointName, (childReturn==expectedReturn));
+
+    return (childReturn==expectedReturn);
+}
+
+void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName, const char*
+                               testPointName)
 {
     char TP[80];
