* AssemblyNameTest.cs: Added tests for Clone and serialization without
[mono.git] / mcs / errors / Makefile
index c7273ab64e732cb30161df254e744a75fdb9232f..eab04d78e48e7cc39188d4150436326119838c2f 100644 (file)
@@ -2,68 +2,71 @@ thisdir = errors
 SUBDIRS = 
 include ../build/rules.make
 
+with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
+
+ifeq (default, $(PROFILE))
 # force this, we don't case if CSC is broken. This also
 # means we can use --options, yay.
 
-MCS = $(INTERNAL_MCS)
-LOCAL_MCS_FLAGS = /nowarn:162 --wlevel 4
-
-GMCS_COMPILE = $(RUNTIME) ../gmcs/gmcs.exe /target:library $(MCS_FLAGS)
+MCS = $(with_mono_path) $(INTERNAL_MCS)
+endif
 
-RUNTEST_PL = ./runtest.pl
+GENERICS_COMPILE = $(CSCOMPILE) /target:library
 
 DISTFILES = \
        CONTRIBUTORS_README     \
        README.tests            \
        errors.txt              \
-       fail                    \
-       runtest.pl              \
-       $(wildcard *.cs)
+       do-tests.pl             \
+       $(wildcard *.cs)        \
+       $(wildcard *.inc)       \
+       $(wildcard *.pub)       \
+       $(wildcard *.response)  \
+       mcs-expect-no-error mcs-expect-wrong-error mcs-ignore-tests \
+       gmcs-expect-no-error gmcs-expect-wrong-error gmcs-ignore-tests \
+       generics-expect-no-error generics-expect-wrong-error \
+       $(wildcard known-issues-*)
+
+all-local: CS0118-2-lib.dll CS0122-10-lib.dll CS0534-3-lib.dll CS0534-4-lib.dll CS0571-3-lib.dll \
+       CS0612-2-lib.dll CS0618-2-lib.dll CS0619-8-lib.dll CS0619-17-lib.dll CS0619-32-lib.dll CS0619-33-lib.dll CS0619-36-lib.dll \
+       CS3005-16-lib.dll CS3013-module.dll
 
-#all-local: run-test-local test-multi-local
-all-local: CS0618-2-lib.dll CS0619-8-lib.dll CS0619-17-lib.dll CS0619-32-lib.dll CS0619-33-lib.dll CS0619-36-lib.dll \
-CS3005-16-lib.dll CS3013-module.dll
+test-local: TestRunner-$(PROFILE).exe
 
-test-local:
+run-test-ondotnet-local:
 
 # again, run-test is when the tests actually happen, so
 # don't compile on make test.
 
-run-test-local: test-multi-local run-mcs-tests run-generics-local
+run-test-local: run-mcs-tests 
 
+test-everything:
+       $(MAKE) PROFILE=default run-test
+       $(MAKE) PROFILE=net_2_0 run-test
+
+ifeq (net_2_0, $(PROFILE))
+COMPILER_NAME = gmcs
+COMPILER = $(topdir)/gmcs/gmcs.exe
+TEST_PATTERN = '*cs*.cs'
+else
+COMPILER_NAME = mcs
+COMPILER = $(topdir)/class/lib/$(PROFILE)/mcs.exe
+TEST_PATTERN = 'cs*.cs'
+endif
+
+ifeq (net_2_0, $(PROFILE))
 run-mcs-tests:
-       @ ./do-tests.pl mcs "$(CSCOMPILE)" "cs*.cs"
-
-run-generics-local:
-       @ ./do-tests.pl gmcs "$(GMCS_COMPILE)" "gcs*.cs"
-
-test-multi-local:
-       @ failed=false; \
-       testsuite_log=test-multi.log; rm -f $$testsuite_log ; \
-       for i in error-*.cs; do \
-               test_out=`echo $$i | sed 's,.cs$$,.out,'` ; \
-               test_log=`echo $$i | sed 's,.cs$$,.log,'` ; \
-               echo -n "Running test $$i ... "; \
-               $(INTERNAL_MCS) $$i > $$test_out 2>&1 || : ; \
-               if $(RUNTEST_PL) $$i $$test_out > $$test_log 2>&1 ; \
-               then echo OK; rm -f $$test_out $$test_log ; \
-                    echo "PASS: $$i" >> $$testsuite_log ; \
-               else echo FAILED; \
-                    echo "FAIL: $$i" >> $$testsuite_log ; \
-                    flist="$$flist $$i"; \
-                    failed=true; \
-               fi; \
-       done; \
-       if $$failed; then \
-               echo "The following tests failed: $$flist"; \
-               exit 1; \
-       else \
-               echo All tests passed; \
-       fi
+       -rm -f gmcs.log
+       @./do-tests.pl gmcs '$(CSCOMPILE)' "cs*.cs"
+       -rm -f generics.log
+       @./do-tests.pl generics '$(GENERICS_COMPILE)' "gcs*.cs"
+else
+run-mcs-tests: TestRunner-$(PROFILE).exe
+       $(with_mono_path) $(RUNTIME) TestRunner-$(PROFILE).exe $(COMPILER_NAME) $(COMPILER) known-issues-$(COMPILER_NAME) $(COMPILER_NAME).log
+endif
 
 clean-local:
-       rm -f *.exe
-       rm -f *.dll
+       rm -f *.exe *.dll *.log *.mdb dummy.xml *.junk
 
 dist-local: dist-default
 
@@ -74,3 +77,6 @@ install-local uninstall-local:
 
 %-module.dll: %-module.cs
        $(BOOTSTRAP_MCS) /target:module /out:$@ $<
+
+TestRunner-$(PROFILE).exe: TestRunner.cs
+       $(CSCOMPILE) /out:$@ TestRunner.cs