2 TEST_PROG=../interpreter/mint
3 JITTEST_PROG=../mini/mono
4 RUNTIME_ARGS=--config tests-config --optimize=all
7 CSC=mcs --unsafe -nowarn:0162
9 BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
44 valuetype-gettype.cs \
45 static-constructor.cs \
117 appdomain-client.cs \
118 appdomain-unload.cs \
172 # These only compile with MS CSC
189 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
190 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
191 TESTBS=$(BENCHSRC:.cs=.exe)
193 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC)
198 %.exe: %.cs TestDriver.dll
199 $(CSC) -r TestDriver.dll -out:$@ $<
204 $(CSC) -target:library -o $@ $(srcdir)/../mini/TestDriver.cs
206 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
209 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
210 for i in $(TESTSI_CS); do \
211 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
213 passed=`expr $${passed} + 1`; \
215 if [ $$? = 2 ]; then break; fi; \
216 failed=`expr $${failed} + 1`; \
219 echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo
221 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
224 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
225 for i in $(TESTSI_IL); do \
226 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
228 passed=`expr $${passed} + 1`; \
230 if [ $$? = 2 ]; then break; fi; \
231 failed=`expr $${failed} + 1`; \
234 echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) failed."; echo
236 testb: $(TEST_PROG) $(TESTBS)
237 for i in $(TESTBS); do \
238 $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
241 testjit: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la
245 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
246 for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do \
248 if $(srcdir)/test-driver $(JITTEST_PROG) $$i $(RUNTIME_ARGS); \
250 passed=`expr $${passed} + 1`; \
252 if [ $$? = 2 ]; then break; fi; \
253 failed=`expr $${failed} + 1`; \
254 failed_tests="$${failed_tests} $$i"; \
257 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
258 if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi;
260 testaot: $(TESTSI_CS) $(TESTBS) libtest.la
264 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
265 for i in $(TESTSI_CS) $(TESTBS); do \
267 $(JITTEST_PROG) --aot $${i} > /dev/null; \
268 if $(srcdir)/test-driver $(JITTEST_PROG) $$i $(RUNTIME_ARGS); \
270 passed=`expr $${passed} + 1`; \
272 if [ $$? = 2 ]; then break; fi; \
273 failed=`expr $${failed} + 1`; \
274 failed_tests="$${failed_tests} $$i"; \
277 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
278 if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi;
280 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
284 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
285 for i in $(TESTSI_CS) $(TESTSI_IL); do \
286 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
288 passed=`expr $${passed} + 1`; \
290 if [ $$? = 2 ]; then break; fi; \
291 failed=`expr $${failed} + 1`; \
292 failed_tests="$${failed_tests} $$i"; \
295 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
296 if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi ;
298 testjitspeed: $(JITTEST_PROG) $(TESTBS)
299 for i in $(TESTBS); do \
301 time $(JITTEST_PROG) $$i; \
307 noinst_LTLIBRARIES = libtest.la
309 INCLUDES = $(GLIB_CFLAGS)
311 libtest_la_LDFLAGS = -rpath `pwd`
312 libtest_la_SOURCES = libtest.c
314 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) TestDriver.dll