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