Index: /trunk/psLib/test/psTest.c
===================================================================
--- /trunk/psLib/test/psTest.c	(revision 537)
+++ /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];
Index: /trunk/psLib/test/psTest.h
===================================================================
--- /trunk/psLib/test/psTest.h	(revision 537)
+++ /trunk/psLib/test/psTest.h	(revision 538)
@@ -15,13 +15,36 @@
 p_printFooter(filePtr, __FILE__, packageName, testPointName, success)
 
+typedef int (*testFcn)(void);
+
+typedef struct
+{
+    testFcn     fcn;
+    const char* testPointName;
+    int         expectedReturn;
+}
+testDescription;
+
+#define runTest(filePtr, packageName, testPointName, fcn, expectedReturn) \
+p_runTest(filePtr, __FILE__, packageName, testPointName, fcn, expectedReturn)
+
+#define runTestSuite(filePtr, packageName, tests) \
+p_runTestSuite(filePtr, __FILE__, packageName, tests)
+
 
 /////////////////////////// PRIVATE FUNCTIONS //////////////////////////////
 
-void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName);
+bool p_runTest(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
+               testFcn fcn, int expectedReturn);
+
+bool p_runTestSuite(FILE *fp, const char* testPointFile, const char* packageName, testDescription tests[]);
+
+void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName,
+                               const char* testPointName);
 
 void p_printNegativeTestHeader(FILE *fp, const char* testPointFile, const char* packageName,
                                const char* testPointName,const char* expectedError, int exitValue);
 
-void p_printFooter(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName, bool
-                   success);
+void p_printFooter(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
+                   bool success);
+
 #endif
