On 25 Jun 2002, Ravi Pratap M wrote:
> > get a boolean ok/fail result - I have to manually go through the results
> > and see if they were 'as expected'. You could address that by trying to
>
> Point taken - this needs to be fixed.
The attached patch will mean that 'make test' only runs the tests which
are known to succeed. The failing ones have been moved to a different
makefile rule.
So, you can now run 'make test' in mcs/errors and mcs/tests before each
commit and expect 100%. If you want to help fix the compiler, you can
pick a test from the 'failures' makefile section and get it working.
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 26 Jun 2002 16:09:12 -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