2003-07-21 Andreas Nahr <ClassDevelopment@A-SoftTech.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         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         vararg.cs               \
168         async_read.cs           \
169         threadpool.cs           \
170         threadpool1.cs          \
171         base-definition.cs
172
173
174 TEST_IL_SRC=                    \
175         cpblkTest.il            \
176         jmpTest.il              \
177         calliTest.il            \
178         ckfiniteTest.il         \
179         locallocTest.il         \
180         initblkTest.il          \
181         even-odd.il             \
182         qt-instance.il          \
183         bug-29859.il
184
185
186 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
187 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
188 TESTBS=$(BENCHSRC:.cs=.exe)
189
190 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC)
191
192 %.exe: %.il
193         ilasm $< /OUTPUT=$@
194
195 %.exe: %.cs
196         $(CSC) $<
197
198 test:   testjit
199
200 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
201         @failed=0; \
202         passed=0; \
203         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
204         for i in $(TESTSI_CS); do       \
205                 if ./test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
206                 then \
207                         passed=`expr $${passed} + 1`; \
208                 else \
209                         failed=`expr $${failed} + 1`; \
210                 fi \
211         done; \
212         echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo
213
214 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
215         @failed=0; \
216         passed=0; \
217         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
218         for i in $(TESTSI_IL); do       \
219                 if ./test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
220                 then \
221                         passed=`expr $${passed} + 1`; \
222                 else \
223                         failed=`expr $${failed} + 1`; \
224                 fi \
225         done; \
226         echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) failed."; echo
227
228 testb: $(TEST_PROG) $(TESTBS)
229         for i in $(TESTBS); do  \
230                 ./test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
231         done
232
233 testjit: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS)
234         @failed=0; \
235         passed=0; \
236         failed_tests="";\
237         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
238         for i in $(TESTSI_CS) $(TESTSI_IL) $(TESTBS); do        \
239                 if ./test-driver $(JITTEST_PROG) $$i $(RUNTIME_ARGS); \
240                 then \
241                         passed=`expr $${passed} + 1`; \
242                 else \
243                         if [ $$? = 2 ]; then break; fi; \
244                         failed=`expr $${failed} + 1`; \
245                         failed_tests="$${failed_tests} $$i"; \
246                 fi \
247         done; \
248         echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
249         if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi; 
250
251 testjitspeed: $(JITTEST_PROG) $(TESTBS)
252         for i in $(TESTBS); do  \
253                 echo $$i;       \
254                 time $(JITTEST_PROG) $$i;       \
255         done
256
257 check:
258         @echo no check yet
259
260 noinst_LTLIBRARIES = libtest.la
261
262 INCLUDES = $(GLIB_CFLAGS)
263
264 libtest_la_LDFLAGS = -rpath `pwd`
265 libtest_la_SOURCES = libtest.c
266
267 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL)
268