2003-07-22 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / tests / Makefile.am
1
2 TEST_PROG=../interpreter/mint
3 JITTEST_PROG=../mini/mono
4 RUNTIME_ARGS=--config tests-config
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         pinvoke4.cs             \
51         pinvoke5.cs             \
52         pinvoke6.cs             \
53         pinvoke7.cs             \
54         pinvoke8.cs             \
55         pinvoke9.cs             \
56         pinvoke10.cs            \
57         pinvoke11.cs            \
58         pinvoke12.cs            \
59         pinvoke13.cs            \
60         pinvoke14.cs            \
61         pinvoke15.cs            \
62         pinvoke16.cs            \
63         pinvoke17.cs            \
64         invoke.cs               \
65         invoke2.cs              \
66         reinit.cs               \
67         box.cs                  \
68         array.cs                \
69         enum.cs                 \
70         enum2.cs                \
71         property.cs             \
72         enumcast.cs             \
73         assignable-tests.cs     \
74         array-cast.cs           \
75         cattr-compile.cs        \
76         cattr-field.cs          \
77         cattr-object.cs         \
78         custom-attr.cs          \
79         double-cast.cs          \
80         newobj-valuetype.cs     \
81         arraylist-clone.cs      \
82         setenv.cs               \
83         vtype.cs                \
84         isvaluetype.cs          \
85         iface6.cs               \
86         ipaddress.cs            \
87         array-vt.cs             \
88         interface1.cs           \
89         reflection-enum.cs      \
90         reflection-prop.cs      \
91         reflection4.cs          \
92         reflection5.cs          \
93         many-locals.cs          \
94         string-compare.cs       \
95         test-prime.cs           \
96         params.cs               \
97         reflection.cs           \
98         interface.cs            \
99         iface.cs                \
100         iface2.cs               \
101         iface3.cs               \
102         iface4.cs               \
103         virtual-method.cs       \
104         intptrcast.cs           \
105         indexer.cs              \
106         stream.cs               \
107         console.cs              \
108         shift.cs                \
109         jit-int.cs              \
110         jit-uint.cs             \
111         jit-long.cs             \
112         long.cs                 \
113         jit-ulong.cs            \
114         jit-float.cs            \
115         pop.cs                  \
116         time.cs                 \
117         appdomain.cs        \
118         appdomain1.cs           \
119         appdomain2.cs           \
120         appdomain3.cs           \
121         appdomain-client.cs     \
122         pointer.cs              \
123         rounding.cs             \
124         hashcode.cs             \
125         delegate1.cs            \
126         delegate2.cs            \
127         delegate3.cs            \
128         delegate4.cs            \
129         delegate5.cs            \
130         delegate6.cs            \
131         delegate7.cs            \
132         remoting1.cs            \
133         remoting2.cs            \
134         remoting3.cs            \
135         remoting4.cs            \
136         remoting5.cs            \
137         nonvirt.cs              \
138         largeexp.cs             \
139         largeexp2.cs            \
140         marshalbyref1.cs        \
141         static-ctor.cs          \
142         inctest.cs              \
143         bound.cs                \
144         array-invoke.cs         \
145         decimal.cs              \
146         decimal-array.cs        \
147         marshal1.cs             \
148         marshal2.cs             \
149         marshal3.cs             \
150         marshal4.cs             \
151         marshal5.cs             \
152         marshal6.cs             \
153         marshal7.cs             \
154         marshal8.cs             \
155         marshal9.cs             \
156         marshal10.cs            \
157         thread.cs               \
158         thread5.cs              \
159         thread6.cs              \
160         thread-static.cs        \
161         float-pop.cs            \
162         interfacecast.cs        \
163         array3.cs               \
164         classinit.cs            \
165         classinit2.cs           \
166         synchronized.cs         \
167         async_read.cs           \
168         threadpool.cs           \
169         threadpool1.cs          \
170         base-definition.cs      \
171         bug-27420.cs
172
173 # These only compile with MS CSC
174 TEST_CSC_SRC=                   \
175         vararg.cs
176
177 TEST_IL_SRC=                    \
178         cpblkTest.il            \
179         jmpTest.il              \
180         calliTest.il            \
181         ckfiniteTest.il         \
182         locallocTest.il         \
183         initblkTest.il          \
184         even-odd.il             \
185         qt-instance.il          \
186         bug-29859.il
187
188
189 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
190 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
191 TESTBS=$(BENCHSRC:.cs=.exe)
192
193 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC)
194
195 %.exe: %.il
196         ilasm $< /OUTPUT=$@
197
198 %.exe: %.cs
199         $(CSC) $<
200
201 test:   testjit
202
203 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
204         @failed=0; \
205         passed=0; \
206         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
207         for i in $(TESTSI_CS); do       \
208                 if ./test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
209                 then \
210                         passed=`expr $${passed} + 1`; \
211                 else \
212                         if [ $$? = 2 ]; then break; fi; \
213                         failed=`expr $${failed} + 1`; \
214                 fi \
215         done; \
216         echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo
217
218 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
219         @failed=0; \
220         passed=0; \
221         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
222         for i in $(TESTSI_IL); do       \
223                 if ./test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
224                 then \
225                         passed=`expr $${passed} + 1`; \
226                 else \
227                         if [ $$? = 2 ]; then break; fi; \
228                         failed=`expr $${failed} + 1`; \
229                 fi \
230         done; \
231         echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) failed."; echo
232
233 testb: $(TEST_PROG) $(TESTBS)
234         for i in $(TESTBS); do  \
235                 ./test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
236         done
237
238 testjit: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la
239         @failed=0; \
240         passed=0; \
241         failed_tests="";\
242         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
243         for i in $(TESTSI_CS) $(TESTSI_IL) $(TESTBS); do        \
244                 if ./test-driver $(JITTEST_PROG) $$i $(RUNTIME_ARGS); \
245                 then \
246                         passed=`expr $${passed} + 1`; \
247                 else \
248                         if [ $$? = 2 ]; then break; fi; \
249                         failed=`expr $${failed} + 1`; \
250                         failed_tests="$${failed_tests} $$i"; \
251                 fi \
252         done; \
253         echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
254         if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi; 
255
256 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
257         @failed=0; \
258         passed=0; \
259         failed_tests="";\
260         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
261         for i in $(TESTSI_CS) $(TESTSI_IL); do \
262                 echo $$i; \
263                 if [ $$i == thread5.exe ]; then \
264                         continue; \
265                 fi; \
266                 if ./test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
267                 then \
268                         passed=`expr $${passed} + 1`; \
269                 else \
270                         if [ $$? = 2 ]; then break; fi; \
271                         failed=`expr $${failed} + 1`; \
272                         failed_tests="$${failed_tests} $$i"; \
273                 fi \
274         done; \
275         echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
276         if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi ;
277
278 testjitspeed: $(JITTEST_PROG) $(TESTBS)
279         for i in $(TESTBS); do  \
280                 echo $$i;       \
281                 time $(JITTEST_PROG) $$i;       \
282         done
283
284 check:
285         @echo no check yet
286
287 noinst_LTLIBRARIES = libtest.la
288
289 INCLUDES = $(GLIB_CFLAGS)
290
291 libtest_la_LDFLAGS = -rpath `pwd`
292 libtest_la_SOURCES = libtest.c
293
294 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL)
295