Add setting of The WRAP flag in the Wrap property's set method.
[mono.git] / mcs / tests / Makefile
1 thisdir = tests
2 SUBDIRS = 
3 include ../build/rules.make
4
5 DISTFILES = README.tests $(wildcard *.cs)
6
7 # We don't want debugging info :-)
8
9 USE_MCS_FLAGS :=
10
11 #
12 # If you add any tests here, please do also add them to README.Tests !
13 #
14
15 TEST_SOURCES = \
16         test-1   test-2   test-3   test-4   test-5   test-6   test-7   test-8   test-9   test-10 \
17         test-11  test-12  test-13  test-14  test-15  test-16  test-17  test-18  test-19  test-20 \
18         test-21  test-22  test-23  test-24  test-25  test-26  test-27  test-28  test-29  test-30 \
19         test-31  test-32  test-33  test-34  test-35  test-36  test-37  test-38  test-39  test-40 \
20         test-41  test-42  test-43  test-44  test-45  test-46  test-47  test-48  test-49  \
21         test-51  test-52  test-53  test-54  test-55  test-56  test-57           test-59  test-60 \
22         test-61  test-62  test-63  test-64  test-65  test-66           test-68  test-69  test-70 \
23         test-71  test-72  test-73  test-74  test-75  test-76  test-77  test-78  test-79  test-80 \
24         test-81  test-82  test-83  test-84  test-85  test-86  test-87  test-88  test-89  test-90 \
25         test-91  test-92  test-93  test-94  test-95  test-96  test-97  test-98  test-99  test-100\
26         test-101 test-102 test-103 test-104 test-105 test-106 test-107 test-108 test-109 test-110\
27         test-111 test-112 test-113 test-114 test-115 test-116 test-117 test-118 test-119 \
28         test-121 test-122 test-123          test-125 test-126 test-127 test-128 test-129 test-130 \
29         test-131                   test-134 test-135 test-136 test-137 test-138 test-139 test-140 \
30         test-141 test-142 test-143 test-144 test-145 test-146 test-147 test-148 test-149 test-150 \
31         test-151 test-152 test-153 test-154 test-155 test-156 test-157 test-158 test-159 test-160 \
32         test-161 test-162 test-163 test-164 test-165 test-166 test-167 test-168 test-169 test-170 \
33                  test-172 test-173 test-174 test-175 test-176 test-177 test-178 test-179 test-180 \
34         test-181 test-182 test-183 test-184 test-185 test-186 test-187 test-188 test-189 test-190 \
35         test-191 test-192 test-193 test-194 test-195 test-196 test-197 test-198 test-199 test-200 \
36         test-201 test-202 test-203 test-204 test-205 test-206 test-207 test-208 test-209 test-210 \
37         test-211 test-212 test-213 test-214 test-215 test-216 test-217 test-218 test-219 test-220
38
39 #
40 # C# 2.0 tests 
41 #
42 TEST2_SOURCES = \
43         2test-1 2test-2 2test-3 2test-4
44
45 UNSAFE_SOURCES = \
46         unsafe-1 unsafe-2 unsafe-3 test-58 test-171 unsafe-5 unsafe-6
47
48 WINDOWS_SOURCES = \
49         test-50 test-67
50
51 # A test is a 'no pass' if it fails on either windows or linux
52 # Test 120 does not pass because the MS.NET runtime is buggy.
53
54 TEST_NOPASS = \
55         test-28  test-45  test-53  test-91  test-102 test-106 test-107 test-120 test-122 test-132 test-133 test-66 test-177
56
57 all-local install-local uninstall-local:
58
59 # casts
60
61 bootstrap-cast.exe: gen-cast-test.cs
62         $(BOOT_COMPILE) /target:exe /out:$@ $<
63
64 casts.cs: bootstrap-cast.exe
65         $(RUNTIME) $< >$@
66
67 casts-mcs.exe: casts.cs
68         $(CSCOMPILE) /target:exe /out:$@ $<
69
70 casts-boot.exe: casts.cs
71         $(BOOT_COMPILE) /target:exe /out:$@ $<
72
73 boot-casts.out: casts-boot.exe
74         $(RUNTIME) $< >$@
75
76 mcs-casts.out: casts-mcs.exe
77         $(RUNTIME) $< >$@
78
79 test-casts: boot-casts.out mcs-casts.out
80         cmp $^
81
82 # compilation is part of the testing too, so we don't actually 
83 # do anything in test-local.
84
85 test-local: 
86
87 run-test-local: test-compiler-jit test-unsafe-compiler-jit test-casts
88
89 clean-local:
90         rm -f *.exe *.out *.pdb casts.cs
91
92 dist-local: dist-default
93         rm -f $(distdir)/casts.cs
94
95 test-compiler-jit: multi test-compiler-jit-real
96
97 test-compiler-jit-real:
98         @rm -f *.exe ; \
99         echo "Flags \"$(TEST_RUNTIME)\" ... " ; \
100         for i in $(TEST_SOURCES) ; do \
101             echo -n "$$i: "; \
102             if $(INTERNAL_MCS) $$i.cs >/dev/null ; then \
103                 true ; \
104             else \
105                 echo FAILED COMPILATION ; exit 1; \
106             fi ; \
107             if $(TEST_RUNTIME) ./$$i.exe >/dev/null ; then \
108                 echo OK ; \
109             else \
110                 echo FAILED ; exit 1; \
111             fi ; \
112         done
113
114 GENERIC_KNOWN_FAILURES = test-55
115
116
117 # Tests the generics compiler, and excludes GENERIC_KNOWN_FAILURES from the build
118 #
119 test-generic:
120         (sources=`echo $(TEST_SOURCES) | tr ' ' '\n' | grep -v $(GENERIC_KNOWN_FAILURES)| tr '\n' ' ' `;  \
121         make INTERNAL_MCS="mono ../gmcs/gmcs.exe" test-compiler-jit-real TEST_SOURCES="$$sources")
122
123 #
124 # Tests the 2.0 features
125 #
126 test-2:
127         make INTERNAL_MCS="mono ../mcs/mcs.exe -v2" test-compiler-jit-real TEST_SOURCES="$(TEST2_SOURCES)"
128
129 test-unsafe-compiler-jit:
130         @echo "Running UNSAFE tests ..." ; \
131         echo "Flags \"$(TEST_RUNTIME)\" ... " ; \
132         for i in $(UNSAFE_SOURCES) ; do \
133             echo -n "$$i: "; \
134             if $(INTERNAL_MCS) /unsafe $$i.cs >/dev/null ; then \
135                 true ; \
136             else \
137                 echo FAILED COMPILATION ; exit 1; \
138             fi ; \
139             if $(TEST_RUNTIME) ./$$i.exe >/dev/null ; then \
140                 echo OK ; \
141             else \
142                 echo FAILED ; exit 1; \
143             fi ; \
144         done
145
146 #
147 # Tests that require separate compilation
148 #
149 multi: multi-1 multi-2 multi-3
150         echo Multi-assembly test passes
151
152 multi-1:
153         $(INTERNAL_MCS) /target:library dll-1.cs
154         $(INTERNAL_MCS) /r:dll-1.dll prog-1.cs /out:prog-1.exe
155         $(TEST_RUNTIME) prog-1.exe
156
157 #
158 # Tests that the order for internal/public in external 
159 # assemblies does not affect the outcome of a build.
160 #
161 multi-2:
162         $(INTERNAL_MCS) /target:library pi.cs
163         $(INTERNAL_MCS) /target:library pp.cs
164         $(INTERNAL_MCS) pu.cs -r:pi.dll -r:pp.dll
165         $(INTERNAL_MCS) pu.cs -r:pp.dll -r:pi.dll
166
167 multi-3:
168         $(INTERNAL_MCS) /target:library conv-lib.cs
169         $(INTERNAL_MCS) /r:conv-lib.dll conv-main.cs
170         $(TEST_RUNTIME) conv-main.exe