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