Fixed broken test profile
[mono.git] / mcs / tests / Makefile
index 4d1acfda1795ed894215bd5c27019d4bef1a1bdb..e8f05e322252e2004349a8c96f486f033bb5a603 100644 (file)
@@ -1,13 +1,13 @@
 #
-# use `run-test-local'
+# use `run-test'
 #
-# *** make sure you add multi-file tests to TEST_ORDERING if necessary
 
 thisdir = tests
 SUBDIRS =
 include ../build/rules.make
 
-DISTFILES = README.tests $(wildcard *.cs) $(wildcard *.il) $(wildcard *.xml) $(wildcard *.inc) $(wildcard known-issues-*)
+DISTFILES = README.tests $(wildcard dlls/**/*.cs)
+DISTFILES += $(wildcard *.cs) $(wildcard *.il) $(wildcard *.xml) $(wildcard *.inc) $(wildcard known-issues-*) $(wildcard *.snk)
 
 with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
 
@@ -25,10 +25,12 @@ endif
 
 USE_MCS_FLAGS :=
 
-all-local install-local uninstall-local:
+# mention all targets
+all-local $(STD_TARGETS:=-local):
 
+VALID_PROFILE := $(filter default net_2_0 net_2_1, $(PROFILE))
+ifdef VALID_PROFILE
 # casts
-
 bootstrap-cast.exe: gen-cast-test.cs
        $(BOOT_COMPILE) -target:exe /out:$@ $<
 
@@ -52,21 +54,42 @@ test-casts: boot-casts.out mcs-casts.out
 
 test-local: casts-boot.exe
 
+eval.exe: eval-tests.cs
+       
+ifeq (net_2_1, $(PROFILE))
+COMPILER_NAME = smcs
+TEST_PATTERN = '*test-*.cs'
+LOCAL_RUNTIME_FLAGS = --security=temporary-smcs-hack
+endif
 ifeq (net_2_0, $(PROFILE))
 COMPILER_NAME = gmcs
-COMPILER = $(topdir)/gmcs/gmcs.exe
 TEST_PATTERN = '*test-*.cs'
-else
+LOCAL_RUNTIME_FLAGS = --security=validil
+TOPTIONS += '-il:ver-il-gmcs.xml'
+endif
+ifeq (default, $(PROFILE))
 COMPILER_NAME = mcs
-COMPILER = $(topdir)/class/lib/$(PROFILE)/mcs.exe
 TEST_PATTERN = 'test-*.cs'
+LOCAL_RUNTIME_FLAGS = --security=validil
 endif
 
-run-test-local: test-377-lib.dll test-443-lib.dll
-       MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe positive $(TEST_PATTERN) $(COMPILER) known-issues-$(COMPILER_NAME) $(COMPILER_NAME).log
+COMPILER = $(topdir)/class/lib/$(PROFILE)/$(COMPILER_NAME).exe
+TESTER = MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(LOCAL_RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe
 
-# do nothing for this target
-run-test-ondotnet-local:
+TEST_ILS := $(wildcard *-lib.il)
+
+ifeq (net_2_0, $(PROFILE))
+eval-test: 
+       $(CSCOMPILE) eval-test.cs -r:$(COMPILER)
+       MONO_PATH=$(topdir)/class/lib/$(PROFILE):. $(RUNTIME) eval-test.exe
+else
+eval-test:
+endif
+
+check: run-test
+
+run-test-local: $(TEST_ILS:.il=.dll) eval-test
+       $(TESTER) -mode:pos -files:$(TEST_PATTERN) -compiler:$(COMPILER) -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log $(TOPTIONS)
 
 test-everything:
        $(MAKE) PROFILE=default run-test
@@ -77,7 +100,7 @@ test-generics:
 
 clean-local:
        -rm -fr dir-*
-       -rm -f *.exe *.dll *.netmodule *.out *.pdb casts.cs *.log
+       -rm -f *.exe *.dll *.netmodule *.out *.pdb *.mdb casts.cs *.log
        -rm -f xml-*.xml
 
 dist-local: dist-default
@@ -95,4 +118,9 @@ ilasm:
        $(ILASM) /dll property-il.il
        $(CSCOMPILE) /r:property-il.dll property-main.cs /out:property-main.exe
        $(TEST_RUNTIME) property-main.exe
+
+       $(CSCOMPILE) -t:library dlls/test-679-2/test-679-lib-2.cs
+       $(CSCOMPILE) -t:library dlls/test-679-1/test-679-lib.cs -r:dlls/test-679-2/test-679-lib-2.dll
+endif
+
 endif