-run-test-local:
- @ failed=false; \
- for i in cs*.cs; do \
- case $$i in \
- cs[0-9]*-[0-9]*cs) \
- error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//' -e 's/-.*//'`; \
- ;;\
- cs[0-9-]*cs) \
- error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//'`; \
- ;;\
- esac; \
- echo -n "Running test $$i ... "; \
- options=`fgrep "// Compiler options:" $$i | sed -e 's/\/\/ Compiler options://'`; \
- if $(CSCOMPILE) --expect-error $$error $$i $$options > /dev/null; \
- then echo OK; \
- else echo FAILED; \
- flist="$$flist $$i"; \
- failed=true; \
- fi; \
- done; \
- if $$failed; then \
- echo "The compiler failed to flag the following errors: $$flist"; \
- else \
- echo All tests passed; \
- fi
-
-run-generics-local:
- @ failed=false; \
- for i in gcs*.cs; do \
- case $$i in \
- gcs[0-9]*-[0-9]*cs) \
- error=`echo $$i | sed -e 's/gcs*//' -e 's/.cs//' -e 's/-.*//'`; \
- ;;\
- gcs[0-9-]*cs) \
- error=`echo $$i | sed -e 's/gcs*//' -e 's/.cs//'`; \
- ;;\
- esac; \
- echo -n "Running test $$i ... "; \
- options=`fgrep "// Compiler options:" $$i | sed -e 's/\/\/ Compiler options://'`; \
- if $(GMCS_COMPILE) --expect-error $$error $$i $$options > /dev/null; \
- then echo OK; \
- else echo FAILED; \
- flist="$$flist $$i"; \
- failed=true; \
- fi; \
- done; \
- if $$failed; then \
- echo "The compiler failed to flag the following errors: $$flist"; \
- else \
- echo All tests passed; \
- fi
-
-test-multi-local:
- @ failed=false; \
- for i in error-*.cs; do \
- echo -n "Running test $$i ... "; \
- if MCS='$(INTERNAL_MCS)' $(RUNTEST_PL) $$i > /dev/null; \
- then echo OK; \
- else echo FAILED; \
- flist="$$flist $$i"; \
- failed=true; \
- fi; \
- done; \
- if $$failed; then \
- echo "The following tests failed: $$flist"; \
- else \
- echo All tests passed; \
- fi
+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:
+ -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