Fixed test
[mono.git] / mcs / tests / Makefile
index 61eb348ea49063390a0efe3b34717cdc59d95c65..e35c8529f8874edaf69a14eb5b1ed9e02472374d 100644 (file)
@@ -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,23 +54,32 @@ test-casts: boot-casts.out mcs-casts.out
 
 test-local: casts-boot.exe
 
+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
 
+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
+
 TEST_ILS := $(wildcard *-lib.il)
 
-run-test-local: $(TEST_ILS:.il=.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
+check: run-test
 
-# do nothing for this target
-run-test-ondotnet-local:
+run-test-local: $(TEST_ILS:.il=.dll)
+       $(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
@@ -79,7 +90,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
@@ -98,3 +109,5 @@ ilasm:
        $(CSCOMPILE) /r:property-il.dll property-main.cs /out:property-main.exe
        $(TEST_RUNTIME) property-main.exe
 endif
+
+endif