Index: trunk/psLib/test/sysUtils/tst_psTrace.c
===================================================================
--- trunk/psLib/test/sysUtils/tst_psTrace.c	(revision 1698)
+++ trunk/psLib/test/sysUtils/tst_psTrace.c	(revision 1732)
@@ -41,10 +41,12 @@
     int lev = 0;
 
+    psTraceSetDestination(stderr);
+
     for (i=0;i<10;i++) {
         (void)psTraceSetLevel(".", i);
         lev = psTraceGetLevel(".");
         if (lev != i) {
-            printf("ERROR: (.) expected trace level was %d, actual was %d\n",
-                   i, lev);
+            fprintf(stderr,"ERROR: (.) expected trace level was %d, actual was %d\n",
+                    i, lev);
             return 1;
         }
@@ -56,6 +58,6 @@
         lev = psTraceGetLevel(".NODE00");
         if (lev != i) {
-            printf("ERROR: (.NODE00) expected trace level was %d, actual was %d\n",
-                   i, lev);
+            fprintf(stderr,"ERROR: (.NODE00) expected trace level was %d, actual was %d\n",
+                    i, lev);
             return 2;
         }
@@ -63,6 +65,6 @@
         lev = psTraceGetLevel(".");
         if (lev != 3) {
-            printf("ERROR: (.) expected trace level was %d, actual was %d\n",
-                   i, 3);
+            fprintf(stderr,"ERROR: (.) expected trace level was %d, actual was %d\n",
+                    i, 3);
             return 3;
         }
@@ -75,6 +77,6 @@
         lev = psTraceGetLevel(".NODE00.NODE01");
         if (lev != i) {
-            printf("ERROR: (.NODE00.NODE01) expected trace level was %d, actual was %d\n",
-                   i, lev);
+            fprintf(stderr,"ERROR: (.NODE00.NODE01) expected trace level was %d, actual was %d\n",
+                    i, lev);
             return 4;
         }
@@ -86,4 +88,5 @@
 static int testTrace01(void)
 {
+    psTraceSetDestination(stderr);
     (void)psTraceSetLevel(".A.B.C.D.E", 5);
 
@@ -95,4 +98,5 @@
 static int testTrace02(void)
 {
+    psTraceSetDestination(stderr);
     psTraceSetLevel(".A.B", 2);
     psTraceSetLevel(".A.B.C.D.E", 5);
@@ -108,4 +112,6 @@
     int i = 0;
     int lev = 0;
+
+    psTraceSetDestination(stderr);
 
     for (i=0;i<10;i++) {
@@ -115,6 +121,6 @@
         lev = psTraceGetLevel(".");
         if (lev != PS_UNKNOWN_TRACE_LEVEL) {
-            printf("ERROR: expected trace level was %d, actual was %d\n",
-                   PS_UNKNOWN_TRACE_LEVEL, lev);
+            fprintf(stderr,"ERROR: expected trace level was %d, actual was %d\n",
+                    PS_UNKNOWN_TRACE_LEVEL, lev);
             return 1;
         }
@@ -128,5 +134,5 @@
             (3 != psTraceGetLevel(".a.b")) ||
             (2 != psTraceGetLevel(".a.b.c"))) {
-        printf("ERROR: trace successFlag = false;levels were not settable?\n");
+        fprintf(stderr,"ERROR: trace successFlag = false;levels were not settable?\n");
         return 2;
     }
@@ -137,5 +143,5 @@
             (PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".a.b")) ||
             (PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".a.b.c"))) {
-        printf("ERROR: trace levels were not reset properly\n");
+        fprintf(stderr,"ERROR: trace levels were not reset properly\n");
         return 3;
     }
@@ -161,8 +167,4 @@
             psTraceSetDestination(fp);
 
-        printPositiveTestHeader(stdout,
-                                "psTrace functions",
-                                "psTrace()");
-
         (void)psTraceSetLevel(".", 4);
         psTrace(".", 5, "(0) This message should not be displayed (%x)\n",
@@ -196,4 +198,6 @@
 static int testTrace05(void)
 {
+    psTraceSetDestination(stderr);
+
     (void)psTraceSetLevel(".", 9);
 
@@ -220,4 +224,6 @@
 static int testTrace06(void)
 {
+    psTraceSetDestination(stderr);
+
     (void)psTraceSetLevel(".", 9);
 
