* icall.c: Add icall to access char conversion tables.
[mono.git] / mono / tests / Makefile.am
1
2 TEST_PROG=../interpreter/mint
3 JITTEST_PROG=../mini/mono
4 RUNTIME_ARGS=--config tests-config --optimize=all
5
6 #CSC=csc /unsafe
7 CSC=mcs --unsafe -nowarn:0162
8
9 BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
10
11 TEST_CS_SRC=                    \
12         array-init.cs           \
13         arraylist.cs            \
14         checked.cs              \
15         char-isnumber.cs        \
16         create-instance.cs      \
17         field-layout.cs         \
18         pack-layout.cs          \
19         hash-table.cs           \
20         test-ops.cs             \
21         obj.cs                  \
22         string.cs               \
23         stringbuilder.cs        \
24         switch.cs               \
25         outparm.cs              \
26         delegate.cs             \
27         bitconverter.cs         \
28         exception.cs            \
29         exception2.cs           \
30         exception3.cs           \
31         exception4.cs           \
32         exception5.cs           \
33         exception6.cs           \
34         exception7.cs           \
35         exception8.cs           \
36         exception10.cs          \
37         exception11.cs          \
38         exception12.cs          \
39         exception13.cs          \
40         exception14.cs          \
41         exception15.cs          \
42         exception16.cs          \
43         struct.cs               \
44         valuetype-gettype.cs    \
45         static-constructor.cs   \
46         pinvoke.cs              \
47         pinvoke1.cs             \
48         pinvoke2.cs             \
49         pinvoke3.cs             \
50         pinvoke9.cs             \
51         pinvoke10.cs            \
52         pinvoke11.cs            \
53         pinvoke12.cs            \
54         pinvoke13.cs            \
55         pinvoke14.cs            \
56         pinvoke15.cs            \
57         pinvoke16.cs            \
58         pinvoke17.cs            \
59         pinvoke18.cs            \
60         invoke.cs               \
61         invoke2.cs              \
62         reinit.cs               \
63         box.cs                  \
64         array.cs                \
65         enum.cs                 \
66         enum2.cs                \
67         property.cs             \
68         enumcast.cs             \
69         assignable-tests.cs     \
70         array-cast.cs           \
71         cattr-compile.cs        \
72         cattr-field.cs          \
73         cattr-object.cs         \
74         custom-attr.cs          \
75         double-cast.cs          \
76         newobj-valuetype.cs     \
77         arraylist-clone.cs      \
78         setenv.cs               \
79         vtype.cs                \
80         isvaluetype.cs          \
81         iface6.cs               \
82         ipaddress.cs            \
83         array-vt.cs             \
84         interface1.cs           \
85         reflection-enum.cs      \
86         reflection-prop.cs      \
87         reflection4.cs          \
88         reflection5.cs          \
89         many-locals.cs          \
90         string-compare.cs       \
91         test-prime.cs           \
92         params.cs               \
93         reflection.cs           \
94         interface.cs            \
95         iface.cs                \
96         iface2.cs               \
97         iface3.cs               \
98         iface4.cs               \
99         virtual-method.cs       \
100         intptrcast.cs           \
101         indexer.cs              \
102         stream.cs               \
103         console.cs              \
104         shift.cs                \
105         jit-int.cs              \
106         jit-uint.cs             \
107         jit-long.cs             \
108         long.cs                 \
109         jit-ulong.cs            \
110         jit-float.cs            \
111         pop.cs                  \
112         time.cs                 \
113         appdomain.cs        \
114         appdomain1.cs           \
115         appdomain2.cs           \
116         appdomain3.cs           \
117         appdomain-client.cs     \
118         appdomain-unload.cs \
119         pointer.cs              \
120         rounding.cs             \
121         hashcode.cs             \
122         delegate1.cs            \
123         delegate2.cs            \
124         delegate3.cs            \
125         delegate4.cs            \
126         delegate5.cs            \
127         delegate6.cs            \
128         delegate7.cs            \
129         remoting1.cs            \
130         remoting2.cs            \
131         remoting3.cs            \
132         remoting4.cs            \
133         remoting5.cs            \
134         nonvirt.cs              \
135         largeexp.cs             \
136         largeexp2.cs            \
137         marshalbyref1.cs        \
138         static-ctor.cs          \
139         inctest.cs              \
140         bound.cs                \
141         array-invoke.cs         \
142         decimal.cs              \
143         decimal-array.cs        \
144         marshal1.cs             \
145         marshal2.cs             \
146         marshal3.cs             \
147         marshal4.cs             \
148         marshal5.cs             \
149         marshal6.cs             \
150         marshal7.cs             \
151         marshal8.cs             \
152         marshal9.cs             \
153         marshal10.cs            \
154         thread.cs               \
155         thread5.cs              \
156         thread6.cs              \
157         thread-static.cs        \
158         context-static.cs       \
159         float-pop.cs            \
160         interfacecast.cs        \
161         array3.cs               \
162         classinit.cs            \
163         classinit2.cs           \
164         synchronized.cs         \
165         async_read.cs           \
166         threadpool.cs           \
167         threadpool1.cs          \
168         base-definition.cs      \
169         bug-27420.cs            \
170         bug-47295.cs            \
171         bug-46781.cs            \
172         bug-48015.cs            \
173         bug-42136.cs
174
175 # These only compile with MS CSC
176 TEST_CSC_SRC=                   \
177         vararg.cs
178
179 TEST_IL_SRC=                    \
180         cpblkTest.il            \
181         jmpTest.il                      \
182         calliTest.il            \
183         ckfiniteTest.il         \
184         locallocTest.il         \
185         initblkTest.il          \
186         qt-instance.il          \
187         vararg.il                       \
188         bug-29859.il            \
189         even-odd.il
190
191
192 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
193 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
194 TESTBS=$(BENCHSRC:.cs=.exe)
195
196 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC)
197
198 %.exe: %.il
199         ilasm -out:$@ $<
200
201 %.exe: %.cs TestDriver.dll
202         $(CSC) -r TestDriver.dll -out:$@ $<
203
204 test:   testjit
205
206 TestDriver.dll:
207         $(CSC) -target:library -o $@ $(srcdir)/../mini/TestDriver.cs
208
209 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
210         @failed=0; \
211         passed=0; \
212         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
213         for i in $(TESTSI_CS); do       \
214                 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
215                 then \
216                         passed=`expr $${passed} + 1`; \
217                 else \
218                         if [ $$? = 2 ]; then break; fi; \
219                         failed=`expr $${failed} + 1`; \
220                 fi \
221         done; \
222         echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo
223
224 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
225         @failed=0; \
226         passed=0; \
227         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
228         for i in $(TESTSI_IL); do       \
229                 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
230                 then \
231                         passed=`expr $${passed} + 1`; \
232                 else \
233                         if [ $$? = 2 ]; then break; fi; \
234                         failed=`expr $${failed} + 1`; \
235                 fi \
236         done; \
237         echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) failed."; echo
238
239 testb: $(TEST_PROG) $(TESTBS)
240         for i in $(TESTBS); do  \
241                 $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
242         done
243
244 testjit: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la
245         @failed=0; \
246         passed=0; \
247         failed_tests="";\
248         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
249         for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do        \
250                 rm -f $${i}.so; \
251                 if $(srcdir)/test-driver $(JITTEST_PROG) $$i $(RUNTIME_ARGS); \
252                 then \
253                         passed=`expr $${passed} + 1`; \
254                 else \
255                         if [ $$? = 2 ]; then break; fi; \
256                         failed=`expr $${failed} + 1`; \
257                         failed_tests="$${failed_tests} $$i"; \
258                 fi \
259         done; \
260         echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
261         if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi; 
262
263 testaot: $(TESTSI_CS) $(TESTBS) libtest.la
264         @failed=0; \
265         passed=0; \
266         failed_tests="";\
267         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
268         for i in $(TESTSI_CS) $(TESTBS); do     \
269                 rm -f $${i}.so; \
270                 $(JITTEST_PROG) --aot $${i} > /dev/null; \
271                 if $(srcdir)/test-driver $(JITTEST_PROG) $$i $(RUNTIME_ARGS); \
272                 then \
273                         passed=`expr $${passed} + 1`; \
274                 else \
275                         if [ $$? = 2 ]; then break; fi; \
276                         failed=`expr $${failed} + 1`; \
277                         failed_tests="$${failed_tests} $$i"; \
278                 fi \
279         done; \
280         echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
281         if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi; 
282
283 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
284         @failed=0; \
285         passed=0; \
286         failed_tests="";\
287         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
288         for i in $(TESTSI_CS) $(TESTSI_IL); do \
289                 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
290                 then \
291                         passed=`expr $${passed} + 1`; \
292                 else \
293                         if [ $$? = 2 ]; then break; fi; \
294                         failed=`expr $${failed} + 1`; \
295                         failed_tests="$${failed_tests} $$i"; \
296                 fi \
297         done; \
298         echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
299         if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi ;
300
301 testjitspeed: $(JITTEST_PROG) $(TESTBS)
302         for i in $(TESTBS); do  \
303                 echo $$i;       \
304                 time $(JITTEST_PROG) $$i;       \
305         done
306
307 check:
308         @echo no check yet
309
310 noinst_LTLIBRARIES = libtest.la
311
312 INCLUDES = $(GLIB_CFLAGS)
313
314 libtest_la_LDFLAGS = -rpath `pwd`
315 libtest_la_SOURCES = libtest.c
316
317 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) TestDriver.dll
318