merged Sys.Web.Services 2.0 support in my branch:
[mono.git] / mcs / tests / Makefile
1 #
2 # use `run-test'
3 #
4
5 thisdir = tests
6 SUBDIRS =
7 include ../build/rules.make
8
9 DISTFILES = README.tests
10 DISTFILES += $(wildcard *.cs) $(wildcard *.il) $(wildcard *.xml) $(wildcard *.inc) $(wildcard known-issues-*) $(wildcard *.snk)
11
12 with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
13
14 ifeq (default, $(PROFILE))
15 # force this, we don't case if CSC is broken. This also
16 # means we can use --options, yay.
17 MCS = $(with_mono_path) $(INTERNAL_MCS)
18 endif
19 ilasm = $(topdir)/class/lib/net_1_1_bootstrap/ilasm.exe
20 ILASM = MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(ilasm)
21
22 ifeq (net_2_0, $(PROFILE))
23 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
24 endif
25
26 USE_MCS_FLAGS :=
27
28 all-local install-local uninstall-local:
29
30 # casts
31
32 bootstrap-cast.exe: gen-cast-test.cs
33         $(BOOT_COMPILE) -target:exe /out:$@ $<
34
35 casts.cs: bootstrap-cast.exe
36         $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
37
38 casts-mcs.exe: casts.cs
39         $(CSCOMPILE) -target:exe /out:$@ $<
40
41 casts-boot.exe: casts.cs
42         $(BOOT_COMPILE) -target:exe /out:$@ $<
43
44 boot-casts.out: casts-boot.exe
45         $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
46
47 mcs-casts.out: casts-mcs.exe
48         $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
49
50 test-casts: boot-casts.out mcs-casts.out
51         cmp $^
52
53 test-local: casts-boot.exe
54
55 ifeq (net_2_0, $(PROFILE))
56 COMPILER_NAME = gmcs
57 COMPILER = $(topdir)/gmcs/gmcs.exe
58 TEST_PATTERN = '*test-*.cs'
59 else
60 COMPILER_NAME = mcs
61 COMPILER = $(topdir)/class/lib/$(PROFILE)/mcs.exe
62 TEST_PATTERN = 'test-*.cs'
63 endif
64
65 TEST_ILS := $(wildcard *-lib.il)
66
67 run-test-local: $(TEST_ILS:.il=.dll)
68         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
69
70 # do nothing for this target
71 run-test-ondotnet-local:
72
73 test-everything:
74         $(MAKE) PROFILE=default run-test
75         $(MAKE) PROFILE=net_2_0 run-test
76
77 test-generics:
78         $(MAKE) PROFILE=net_2_0 run-test
79
80 clean-local:
81         -rm -fr dir-*
82         -rm -f *.exe *.dll *.netmodule *.out *.pdb casts.cs *.log
83         -rm -f xml-*.xml
84
85 dist-local: dist-default
86         rm -f $(distdir)/casts.cs
87
88 %-il.dll: %-il.il
89         $(ILASM) /dll $<
90
91 %-lib.dll: %-lib.il
92         $(ILASM) /dll /out:$@ $<
93
94 ifeq (default, $(PROFILE))
95 run-test-local: ilasm
96 ilasm:
97         $(ILASM) /dll property-il.il
98         $(CSCOMPILE) /r:property-il.dll property-main.cs /out:property-main.exe
99         $(TEST_RUNTIME) property-main.exe
100 endif