On 27 Jun 2002, Ravi Pratap M wrote:

> I tried applying your patches and two applied fine but one of them got
> rejected [the patch to the makefile in errors] !

Ah, I see what happened - end of line terminator woes.  I have the cygwin
cvs.exe and the wincvs cvs.exe on this machine, which have different
default behaviour with respect to cr/lf.  If I'm not careful, I use the
wrong one ...

Here's the patch again, with only linefeeds (I checked!).  It ensures that
only 'expected to succeed' tests are run in mcs/errors.

Andrew

- www.tardis.ed.ac.uk/~adb -
Index: errors/makefile
===================================================================
RCS file: /mono/mcs/errors/makefile,v
retrieving revision 1.5
diff -u -r1.5 makefile
--- errors/makefile     25 Jun 2002 19:23:14 -0000      1.5
+++ errors/makefile     28 Jun 2002 08:26:17 -0000
@@ -4,10 +4,17 @@
 #MCS=mono ../mcs/mcs.exe --wlevel 4 # for linux
 MCS=../mcs/mcs.exe --wlevel 4 # for windows
 
+FAILURES = cs-20.cs cs0051.cs cs0060.cs cs0108.cs cs0110.cs cs0111.cs cs0118.cs \
+          cs0136.cs cs0136-2.cs cs0164.cs cs0165.cs cs0165-2.cs cs0171.cs cs0216.cs \
+          cs0234.cs cs0255.cs cs0523.cs cs0529.cs cs0654.cs cs1001.cs cs1513.cs \
+          cs1518.cs cs1525.cs cs1528.cs cs1529.cs cs1552.cs cs1604.cs
+
+PASSES := $(filter-out $(FAILURES),$(wildcard cs*.cs))
 
 all:
-       @ failed=false; \
-       for i in cs*.cs; do \
+       @pass_count=0; \
+       fail_count=0; \
+       for i in $(PASSES); do \
                case $$i in \
                        cs[0-9]*-[0-9]*cs) \
                        error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//' -e 's/-.*//'`; 
\
@@ -18,14 +25,18 @@
                esac; \
                echo -n "Running test $$i ... "; \
                if $(MCS) --unsafe --expect-error $$error $$i > /dev/null; \
-               then echo OK; \
-               else echo FAILED; \
+               then \
+                    pass_count=`expr $$pass_count + 1`; \
+                    echo OK; \
+               else \
+                    fail_count=`expr $$fail_count + 1`; \
+                    echo FAILED \($$fail_count failed so far\); \
                     flist="$$flist $$i"; \
-                    failed=true; \
                fi; \
        done; \
-       if $$failed; then \
-               echo "The following tests failed: $$flist"; \
+       if [ $$fail_count -ne 0 ]; \
+       then \
+               echo "The following $$failures tests failed: $$flist"; \
        else \
-               echo All tests passed; \
+               echo All $$pass_count tests passed; \
        fi

Reply via email to