[tuner] handle the case with multiple "preserve" attributes
[mono-project.git] / mcs / tests / Makefile
blob1b1a16ca1848ba14db594af3408f0bce0531e37e
2 # use make run-test PROFILE=net_2_0
5 thisdir = tests
6 SUBDIRS =
7 include ../build/rules.make
9 DISTFILES = $(wildcard dlls/**/*.cs) $(wildcard dlls/*.cs) $(wildcard dlls/*.inc) $(wildcard dlls/*.il)
10 DISTFILES += $(wildcard *.cs) $(wildcard *.il) $(wildcard *.xml) $(wildcard *.inc) $(wildcard known-issues-*) $(wildcard *.snk)
12 with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
14 ilasm = $(topdir)/class/lib/$(PROFILE)/ilasm.exe
15 ILASM = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(ilasm)
17 -include $(mcs_topdir)/build/config.make
19 USE_MCS_FLAGS :=
21 # mention all targets
22 all-local $(STD_TARGETS:=-local):
24 VALID_PROFILE := $(filter $(DEFAULT_PROFILE), $(PROFILE))
25 ifdef VALID_PROFILE
26 # casts
27 bootstrap-cast.exe: gen-cast-test.cs
28 $(BOOT_COMPILE) -target:exe /out:$@ $<
30 casts.cs: bootstrap-cast.exe
31 $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
33 casts-mcs.exe: casts.cs
34 $(CSCOMPILE) -target:exe /out:$@ $<
36 casts-boot.exe: casts.cs
37 $(BOOT_COMPILE) -target:exe /out:$@ $<
39 boot-casts.out: casts-boot.exe
40 $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
42 mcs-casts.out: casts-mcs.exe
43 $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
45 test-casts: boot-casts.out mcs-casts.out
46 cmp $^
47 -rm -f bootstrap-cast.exe casts.cs casts-boot.exe casts-mcs.exe boot-casts.out mcs-casts.out
49 TEST_PATTERN = 'v2'
51 ifeq (net_4_x, $(PROFILE))
52 TEST_PATTERN = 'v4'
53 DEFINES = -compiler-options:"-d:NET_4_0;NET_4_5"
54 endif
56 LOCAL_RUNTIME_FLAGS = --verify-all
57 COMPILER = $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/mcs.exe
58 TESTER = MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(LOCAL_RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe
60 TEST_ILS := $(wildcard *-lib.il)
62 build-compiler-lib:
63 cd ../class/Mono.CSharp && $(MAKE) NO_DIR_CHECK=yes
65 qcheck: build-compiler-lib qcheck2
67 qcheck2:
68 $(TESTER) -mode:pos -files:$(TEST_PATTERN) -compiler:$(COMPILER) -issues:known-issues-$(PROFILE) -log:$(PROFILE).log -il:ver-il-$(PROFILE).xml $(DEFINES) $(TOPTIONS)
70 gen-mt-tests:
71 $(TESTER) -mode:nunit -files:'v2' -compiler:$(COMPILER) -issues:known-issues-mt -compiler-options:"-lib:$(topdir)/class/lib/monotouch projects/MonoTouch/ivt.cs"
73 test-local:
76 run-test-local: $(TEST_ILS:.il=.dll) setup qcheck
78 check: run-test-local
80 endif
82 clean-local:
83 -rm -fr dir-*
84 -rm -f *.exe *.dll *.netmodule *.out *.pdb *.mdb casts.cs *.log
85 -rm -f xml-*.xml
87 dist-local: dist-default
88 rm -f $(distdir)/casts.cs
90 csproj-local:
92 %-il.dll: %-il.il
93 $(ILASM) /dll $<
95 %-lib.dll: %-lib.il
96 $(ILASM) /dll /out:$@ $<
98 setup:
99 $(CSCOMPILE) -t:library dlls/test-679-2/test-679-lib-2.cs
100 $(CSCOMPILE) -t:library dlls/test-679-1/test-679-lib.cs -r:dlls/test-679-2/test-679-lib-2.dll
101 $(ILASM) -dll dlls/test-883.il