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