X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Ftests%2FMakefile;h=9170cb295323a2b85a0d6faf37793b25bbd86932;hb=2d23bfcbce7a3f7e54dcd5911adb88b244baca35;hp=e9cecbf49b4670c234ac04343042b0d5c17e930f;hpb=264c06c08365188f3afb4b77cde389d73b1d9e70;p=mono.git diff --git a/mcs/tests/Makefile b/mcs/tests/Makefile index e9cecbf49b4..9170cb29532 100644 --- a/mcs/tests/Makefile +++ b/mcs/tests/Makefile @@ -1,34 +1,25 @@ # -# use `run-test' +# use make run-test PROFILE=net_2_0 # thisdir = tests SUBDIRS = include ../build/rules.make -DISTFILES = README.tests +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" -ifeq (default, $(PROFILE)) -# force this, we don't case if CSC is broken. This also -# means we can use --options, yay. -MCS = $(with_mono_path) $(INTERNAL_MCS) -endif -ilasm = $(topdir)/class/lib/net_1_1_bootstrap/ilasm.exe -ILASM = MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(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 +ilasm = $(topdir)/class/lib/$(PROFILE)/ilasm.exe +ILASM = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(ilasm) USE_MCS_FLAGS := # mention all targets all-local $(STD_TARGETS:=-local): -VALID_PROFILE := $(filter default net_2_0 net_2_1, $(PROFILE)) +VALID_PROFILE := $(filter net_2_0 moonlight net_4_0, $(PROFILE)) ifdef VALID_PROFILE # casts bootstrap-cast.exe: gen-cast-test.cs @@ -51,21 +42,28 @@ mcs-casts.out: casts-mcs.exe 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 -test-local: casts-boot.exe +eval.exe: eval-tests.cs -ifeq (net_2_1, $(PROFILE)) +ifeq (net_4_0, $(PROFILE)) +COMPILER_NAME = dmcs +TEST_PATTERN = 'v4' +LOCAL_RUNTIME_FLAGS = --verify-all +DEFINES = -compiler-options:"-d:NET_4_0" +#TOPTIONS += '-il:ver-il-dmcs.xml' +endif +ifeq (moonlight, $(PROFILE)) COMPILER_NAME = smcs -TEST_PATTERN = '*test-*.cs' +TEST_PATTERN = 'v2' LOCAL_RUNTIME_FLAGS = --security=temporary-smcs-hack +DEFINES = -compiler-options:"-d:MOONLIGHT" endif ifeq (net_2_0, $(PROFILE)) COMPILER_NAME = gmcs -TEST_PATTERN = '*test-*.cs' -endif -ifeq (default, $(PROFILE)) -COMPILER_NAME = mcs -TEST_PATTERN = 'test-*.cs' +TEST_PATTERN = 'v2' +LOCAL_RUNTIME_FLAGS = --verify-all +TOPTIONS += '-il:ver-il-gmcs.xml' endif COMPILER = $(topdir)/class/lib/$(PROFILE)/$(COMPILER_NAME).exe @@ -73,36 +71,43 @@ TESTER = MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(LOCAL_RUNT TEST_ILS := $(wildcard *-lib.il) -run-test-local: $(TEST_ILS:.il=.dll) - $(TESTER) positive $(TEST_PATTERN) '$(COMPILER)' known-issues-$(COMPILER_NAME) $(COMPILER_NAME).log +eval-test: + $(CSCOMPILE) eval-test.cs -r:Mono.CSharp.dll + $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) eval-test.exe + +build-compiler-lib: + cd ../class/Mono.CSharp && $(MAKE) NO_DIR_CHECK=yes -test-everything: - $(MAKE) PROFILE=default run-test - $(MAKE) PROFILE=net_2_0 run-test +qcheck: build-compiler-lib eval-test + $(TESTER) -mode:pos -files:$(TEST_PATTERN) -compiler:$(COMPILER) -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log $(TOPTIONS) $(DEFINES) -test-generics: - $(MAKE) PROFILE=net_2_0 run-test +test-local: + @: + +run-test-local: $(TEST_ILS:.il=.dll) setup check + +endif 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 rm -f $(distdir)/casts.cs +csproj-local: + %-il.dll: %-il.il $(ILASM) /dll $< %-lib.dll: %-lib.il $(ILASM) /dll /out:$@ $< -ifeq (default, $(PROFILE)) -run-test-local: ilasm -ilasm: +setup: $(ILASM) /dll property-il.il $(CSCOMPILE) /r:property-il.dll property-main.cs /out:property-main.exe $(TEST_RUNTIME) property-main.exe -endif -endif + $(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