src/lib/tests/makefile 1.34

1.34 2009/04/18 19:40:37 markd
fixed test problem due to timing of processes
Index: src/lib/tests/makefile
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/tests/makefile,v
retrieving revision 1.33
retrieving revision 1.34
diff -b -B -U 4 -r1.33 -r1.34
--- src/lib/tests/makefile	10 Mar 2009 00:34:41 -0000	1.33
+++ src/lib/tests/makefile	18 Apr 2009 19:40:37 -0000	1.34
@@ -75,15 +75,15 @@
 	${BIN_DIR}/pipelineTester -exitCode=1 false
 
 # test redirecting stderr, see that two process can write stderr, but only
 # the second's stdout should make it to the end of the pipe.  Since order
-# of writes to stderr is determined by process scheduling, sort the output
-# before comparing.
+# of writes to stderr is determined by process scheduling and when a process
+# terminates due to SIGPIPE, just check that stderr was not empty, don't
+# check contents.
 pipelineWriteErr: ${BIN_DIR}/pipelineTester mkdirs
-	${BIN_DIR}/pipelineTester -write -otherEnd=output/$@.out -stderr=output/$@.raw.err "sh -c 'echo OUT; echo ERR >&2'"  "sh -c 'echo OUT2; echo ERR2 >&2'"
+	${BIN_DIR}/pipelineTester -write -otherEnd=output/$@.out -stderr=output/$@.err "sh -c 'echo OUT; echo ERR >&2'"  "sh -c 'echo OUT2; echo ERR2 >&2'"
 	diff -b expected/$@.out output/$@.out
-	sort output/$@.raw.err > output/$@.err
-	diff -b expected/$@.err output/$@.err
+	test -s output/$@.err
 
 ${BIN_DIR}/pipelineTester:  mkdirs pipelineTester.o ${MYLIBS}
 	${CC} ${COPT} -o ${BIN_DIR}/pipelineTester pipelineTester.o ${MYLIBS} ${L}