On Mon, 2005-06-06 at 16:51, Christopher Faylor wrote: > Actually neither is right. The tests are supposed to run to > completion, not stop on a failure.
My first cut was this, but it could have led to a tedious accumulation of if/then/else/if/then/else: Index: winsup/testsuite/Makefile.in =================================================================== RCS file: /cvs/src/src/winsup/testsuite/Makefile.in,v retrieving revision 1.20 diff -u -p -r1.20 Makefile.in --- winsup/testsuite/Makefile.in 6 Jun 2005 21:13:31 -0000 1.20 +++ winsup/testsuite/Makefile.in 7 Jun 2005 01:28:25 -0000 @@ -186,8 +186,11 @@ check: $(TESTSUP_LIB_NAME) $(RUNTIME) cy TCL_LIBRARY=`cd .. ; cd ${srcdir}/../../tcl/library ; pwd` ; \ export TCL_LIBRARY ; fi ; \ PATH=$(bupdir)/cygwin:$${PATH} ;\ - $(RUNTEST) --tool winsup $(RUNTESTFLAGS) ;\ - $(RUNTEST) --tool cygload $(RUNTESTFLAGS) + $(RUNTEST) --tool winsup $(RUNTESTFLAGS) ; WINSUPSTATUS=$$?;\ + $(RUNTEST) --tool cygload $(RUNTESTFLAGS) ; CYGLOADSTATUS=$$?;\ + if [ $$WINSUPSTATUS -ne 0 ] ; then \ + exit $$WINSUPSTATUS; \ + else exit $$CYGLOADSTATUS; fi; cygrun.o: cygrun.c $(CC) $(MINGW_CFLAGS) -o $@ -c $< So I wrote a more general script, discovered that cygwin uses ash instead of bash for /bin/sh, and rewrote the more general script so ash could handle it. Since ash doesn't seem to support arrays, I wound up using "eval", and was thoroughly perplexed at the way that the first "eval" seems to get thrown away. Index: winsup/testsuite/Makefile.in =================================================================== RCS file: /cvs/src/src/winsup/testsuite/Makefile.in,v retrieving revision 1.20 diff -u -p -r1.20 Makefile.in --- winsup/testsuite/Makefile.in 6 Jun 2005 21:13:31 -0000 1.20 +++ winsup/testsuite/Makefile.in 8 Jun 2005 18:39:42 -0000 @@ -179,6 +179,8 @@ testsuite/site.exp: site.exp # Note: we set the PATH so that we can pick up cygwin0.dll +TOOLS = winsup cygload + check: $(TESTSUP_LIB_NAME) $(RUNTIME) cygrun.exe testsuite/site.exp cd testsuite; \ EXPECT=${EXPECT} ; export EXPECT ; \ @@ -186,8 +188,18 @@ check: $(TESTSUP_LIB_NAME) $(RUNTIME) cy TCL_LIBRARY=`cd .. ; cd ${srcdir}/../../tcl/library ; pwd` ; \ export TCL_LIBRARY ; fi ; \ PATH=$(bupdir)/cygwin:$${PATH} ;\ - $(RUNTEST) --tool winsup $(RUNTESTFLAGS) ;\ - $(RUNTEST) --tool cygload $(RUNTESTFLAGS) + eval ""; \ + for tool in $(TOOLS); do \ + $(RUNTEST) --tool $$tool $(RUNTESTFLAGS); \ + eval "results_$$tool=$$?"; \ + done; \ + for tool in $(TOOLS) ; do \ + eval "result=\$$results_$$tool"; \ + if [ $${result:-0} -ne 0 ] ; then \ + echo "$$tool failed: $$result"; \ + exit $$result; \ + fi; \ + done; cygrun.o: cygrun.c $(CC) $(MINGW_CFLAGS) -o $@ -c $<