2 TEST_PROG=../interpreter/mint
3 JITTEST_PROG=../mini/mono
4 RUNTIME_ARGS=--config tests-config --optimize=all
6 # Some of the shell commands below require bash
10 CSC=mcs --unsafe -nowarn:0162
12 BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
47 valuetype-gettype.cs \
48 static-constructor.cs \
120 appdomain-client.cs \
121 appdomain-unload.cs \
178 # These only compile with MS CSC
195 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
196 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
197 TESTBS=$(BENCHSRC:.cs=.exe)
199 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC)
204 %.exe: %.cs TestDriver.dll
205 $(CSC) -r TestDriver.dll -out:$@ $<
210 $(CSC) -target:library -o $@ $(srcdir)/../mini/TestDriver.cs
212 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
215 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
216 for i in $(TESTSI_CS); do \
217 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
219 passed=`expr $${passed} + 1`; \
221 if [ $$? = 2 ]; then break; fi; \
222 failed=`expr $${failed} + 1`; \
225 echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo
227 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
230 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
231 for i in $(TESTSI_IL); do \
232 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
234 passed=`expr $${passed} + 1`; \
236 if [ $$? = 2 ]; then break; fi; \
237 failed=`expr $${failed} + 1`; \
240 echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) failed."; echo
242 testb: $(TEST_PROG) $(TESTBS)
243 for i in $(TESTBS); do \
244 $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
247 testjit: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la
251 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
252 for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do \
254 if $(srcdir)/test-driver $(JITTEST_PROG) $$i $(RUNTIME_ARGS); \
256 passed=`expr $${passed} + 1`; \
258 if [ $$? = 2 ]; then break; fi; \
259 failed=`expr $${failed} + 1`; \
260 failed_tests="$${failed_tests} $$i"; \
263 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
264 if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi;
266 testaot: $(TESTSI_CS) $(TESTBS) libtest.la
270 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
271 for i in $(TESTSI_CS) $(TESTBS); do \
273 $(JITTEST_PROG) --aot $${i} > /dev/null; \
274 if $(srcdir)/test-driver $(JITTEST_PROG) $$i $(RUNTIME_ARGS); \
276 passed=`expr $${passed} + 1`; \
278 if [ $$? = 2 ]; then break; fi; \
279 failed=`expr $${failed} + 1`; \
280 failed_tests="$${failed_tests} $$i"; \
283 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
284 if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi;
286 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
290 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
291 for i in $(TESTSI_CS) $(TESTSI_IL); do \
292 if $(srcdir)/test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
294 passed=`expr $${passed} + 1`; \
296 if [ $$? = 2 ]; then break; fi; \
297 failed=`expr $${failed} + 1`; \
298 failed_tests="$${failed_tests} $$i"; \
301 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
302 if [ $$failed > 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi ;
304 testjitspeed: $(JITTEST_PROG) $(TESTBS)
305 for i in $(TESTBS); do \
307 time $(JITTEST_PROG) $$i; \
313 noinst_LTLIBRARIES = libtest.la
315 INCLUDES = $(GLIB_CFLAGS)
317 libtest_la_LDFLAGS = -rpath `pwd`
318 libtest_la_SOURCES = libtest.c
320 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) TestDriver.dll