2006-12-05 Chris Toshok <toshok@ximian.com>
[mcs.git] / tests / Makefile
blob61eb348ea49063390a0efe3b34717cdc59d95c65
2 # use `run-test'
5 thisdir = tests
6 SUBDIRS =
7 include ../build/rules.make
9 DISTFILES = README.tests
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 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)
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
26 USE_MCS_FLAGS :=
28 all-local install-local uninstall-local:
30 # casts
32 bootstrap-cast.exe: gen-cast-test.cs
33 $(BOOT_COMPILE) -target:exe /out:$@ $<
35 casts.cs: bootstrap-cast.exe
36 $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
38 casts-mcs.exe: casts.cs
39 $(CSCOMPILE) -target:exe /out:$@ $<
41 casts-boot.exe: casts.cs
42 $(BOOT_COMPILE) -target:exe /out:$@ $<
44 boot-casts.out: casts-boot.exe
45 $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
47 mcs-casts.out: casts-mcs.exe
48 $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
50 test-casts: boot-casts.out mcs-casts.out
51 cmp $^
53 test-local: casts-boot.exe
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
65 TEST_ILS := $(wildcard *-lib.il)
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
70 # do nothing for this target
71 run-test-ondotnet-local:
73 test-everything:
74 $(MAKE) PROFILE=default run-test
75 $(MAKE) PROFILE=net_2_0 run-test
77 test-generics:
78 $(MAKE) PROFILE=net_2_0 run-test
80 clean-local:
81 -rm -fr dir-*
82 -rm -f *.exe *.dll *.netmodule *.out *.pdb casts.cs *.log
83 -rm -f xml-*.xml
85 dist-local: dist-default
86 rm -f $(distdir)/casts.cs
88 %-il.dll: %-il.il
89 $(ILASM) /dll $<
91 %-lib.dll: %-lib.il
92 $(ILASM) /dll /out:$@ $<
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