2 TEST_PROG=../interpreter/mint
3 JITTEST_PROG=../mini/mono
4 RUNTIME_ARGS=--config tests-config --optimize=all
6 CSC=mcs --unsafe -nowarn:0162
8 BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
43 valuetype-gettype.cs \
44 static-constructor.cs \
115 appdomain-client.cs \
116 appdomain-unload.cs \
173 # These only compile with MS CSC
190 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
191 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
192 TESTBS=$(BENCHSRC:.cs=.exe)
194 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC)
199 %.exe: %.cs TestDriver.dll
200 $(CSC) -r TestDriver.dll -out:$@ $<
205 $(CSC) -target:library -o $@ $(srcdir)/../mini/TestDriver.cs
207 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
210 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
211 for i in $(TESTSI_CS); do \
212 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
214 passed=`expr $${passed} + 1`; \
216 if [ $$? = 2 ]; then break; fi; \
217 failed=`expr $${failed} + 1`; \
220 echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo
222 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
225 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
226 for i in $(TESTSI_IL); do \
227 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
229 passed=`expr $${passed} + 1`; \
231 if [ $$? = 2 ]; then break; fi; \
232 failed=`expr $${failed} + 1`; \
235 echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) failed."; echo
237 testb: $(TEST_PROG) $(TESTBS)
238 for i in $(TESTBS); do \
239 $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
242 testjit: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la
246 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
247 for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do \
249 if $(srcdir)/test-driver $(JITTEST_PROG) $$i $(RUNTIME_ARGS); \
251 passed=`expr $${passed} + 1`; \
253 if [ $$? = 2 ]; then break; fi; \
254 failed=`expr $${failed} + 1`; \
255 failed_tests="$${failed_tests} $$i"; \
258 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
259 if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi;
261 testaot: $(TESTSI_CS) $(TESTBS) libtest.la
265 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
266 for i in $(TESTSI_CS) $(TESTBS); do \
268 $(JITTEST_PROG) --aot $${i} > /dev/null; \
269 if $(srcdir)/test-driver $(JITTEST_PROG) $$i $(RUNTIME_ARGS); \
271 passed=`expr $${passed} + 1`; \
273 if [ $$? = 2 ]; then break; fi; \
274 failed=`expr $${failed} + 1`; \
275 failed_tests="$${failed_tests} $$i"; \
278 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
279 if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi;
281 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
285 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
286 for i in $(TESTSI_CS) $(TESTSI_IL); do \
287 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
289 passed=`expr $${passed} + 1`; \
291 if [ $$? = 2 ]; then break; fi; \
292 failed=`expr $${failed} + 1`; \
293 failed_tests="$${failed_tests} $$i"; \
296 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
297 if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi ;
299 testjitspeed: $(JITTEST_PROG) $(TESTBS)
300 for i in $(TESTBS); do \
302 time $(JITTEST_PROG) $$i; \
308 noinst_LTLIBRARIES = libtest.la
310 INCLUDES = $(GLIB_CFLAGS)
312 libtest_la_LDFLAGS = -rpath `pwd`
313 libtest_la_SOURCES = libtest.c
315 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) TestDriver.dll