Merge pull request #901 from Blewzman/FixAggregateExceptionGetBaseException
[mono.git] / mcs / tests / Makefile
index ed169d67b04db8d6a726eba597508066fa69f6fe..33925e7df282c7380770f962b61223024d5b71f3 100644 (file)
@@ -6,7 +6,7 @@ thisdir = tests
 SUBDIRS =
 include ../build/rules.make
 
-DISTFILES = README.tests $(wildcard dlls/**/*.cs)
+DISTFILES = $(wildcard dlls/**/*.cs) $(wildcard dlls/*.cs) $(wildcard dlls/*.inc)
 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"
@@ -14,16 +14,12 @@ with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARA
 ilasm = $(topdir)/class/lib/$(PROFILE)/ilasm.exe
 ILASM = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(ilasm)
 
-ifeq (net_2_0, $(PROFILE))
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/net_2_0_bootstrap/mcs.exe
-endif
-
 USE_MCS_FLAGS :=
 
 # mention all targets
 all-local $(STD_TARGETS:=-local):
 
-VALID_PROFILE := $(filter net_2_0 net_2_1 net_4_0, $(PROFILE))
+VALID_PROFILE := $(filter net_4_5, $(PROFILE))
 ifdef VALID_PROFILE
 # casts
 bootstrap-cast.exe: gen-cast-test.cs
@@ -48,52 +44,36 @@ test-casts: boot-casts.out mcs-casts.out
        cmp $^
        -rm -f bootstrap-cast.exe casts.cs casts-boot.exe casts-mcs.exe boot-casts.out mcs-casts.out
 
-eval.exe: eval-tests.cs
+TEST_PATTERN = 'v2'
 
-ifeq (net_4_0, $(PROFILE))
-COMPILER_NAME = dmcs
+ifeq (net_4_5, $(PROFILE))
 TEST_PATTERN = 'v4'
-LOCAL_RUNTIME_FLAGS = --verify-all
-#TOPTIONS += '-il:ver-il-dmcs.xml'
-endif
-ifeq (net_2_1, $(PROFILE))
-COMPILER_NAME = smcs
-TEST_PATTERN = 'v2'
-LOCAL_RUNTIME_FLAGS = --security=temporary-smcs-hack
-endif
-ifeq (net_2_0, $(PROFILE))
-COMPILER_NAME = gmcs
-TEST_PATTERN = 'v2'
-LOCAL_RUNTIME_FLAGS = --verify-all
-TOPTIONS += '-il:ver-il-gmcs.xml'
+DEFINES = -compiler-options:"-d:NET_4_0;NET_4_5"
 endif
 
-COMPILER = $(topdir)/class/lib/$(PROFILE)/$(COMPILER_NAME).exe
+LOCAL_RUNTIME_FLAGS = --verify-all
+COMPILER = $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/mcs.exe
 TESTER = MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(LOCAL_RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe
 
 TEST_ILS := $(wildcard *-lib.il)
 
-eval-test: 
-       $(CSCOMPILE) eval-test.cs -r:$(COMPILER)
-       $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) eval-test.exe
+build-compiler-lib:
+       cd ../class/Mono.CSharp && $(MAKE) NO_DIR_CHECK=yes
+
+qcheck: build-compiler-lib qcheck2
+       
+qcheck2:
+       $(TESTER) -mode:pos -files:$(TEST_PATTERN) -compiler:$(COMPILER) -issues:known-issues-$(PROFILE) -log:$(PROFILE).log -il:ver-il-$(PROFILE).xml $(DEFINES) $(TOPTIONS)
 
-check: eval-test
-       $(TESTER) -mode:pos -files:$(TEST_PATTERN) -compiler:$(COMPILER) -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log $(TOPTIONS)
+gen-mt-tests:
+       $(TESTER) -mode:nunit -files:'v2' -compiler:$(COMPILER) -issues:known-issues-mt -compiler-options:"-lib:$(topdir)/class/lib/monotouch projects/MonoTouch/ivt.cs"
 
 test-local:
        @:
 
-run-test-local: $(TEST_ILS:.il=.dll) setup check
-
-# Temporary testing targets
-cecil:
-       rm -f *.mdb
-       $(TESTER) -mode:pos -files:'test-*.cs' -compiler:gmcs.exe -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log -verbose
+run-test-local: $(TEST_ILS:.il=.dll) setup qcheck
 
-cecil2:
-       rm -f *.mdb
-       $(TESTER) -mode:pos -files:'*test-*.cs' -compiler:gmcs.exe -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log -verbose
-# End  
+check: run-test-local
 
 endif
 
@@ -105,16 +85,15 @@ clean-local:
 dist-local: dist-default
        rm -f $(distdir)/casts.cs
 
+csproj-local:
+
 %-il.dll: %-il.il
        $(ILASM) /dll $<
 
 %-lib.dll: %-lib.il
        $(ILASM) /dll /out:$@ $<
-       
-setup:
-       $(ILASM) /dll property-il.il
-       $(CSCOMPILE) /r:property-il.dll property-main.cs /out:property-main.exe
-       $(TEST_RUNTIME) property-main.exe
 
+setup:
        $(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
+       $(ILASM) -dll dlls/test-883.il