3 TEST_PROG = ../interpreter/mint
4 JITTEST_PROG = ../mini/mono
6 TEST_PROG_RUN = MONO_PATH=$(mcs_topdir)/class/lib/default $(LIBTOOL) --mode=execute $(TEST_PROG)
7 JITTEST_PROG_RUN = MONO_PATH=$(mcs_topdir)/class/lib/default $(LIBTOOL) --mode=execute $(JITTEST_PROG)
9 RUNTIME_ARGS=--config tests-config --optimize=all
11 RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/default $(top_builddir)/runtime/mono-wrapper
13 CSC = $(RUNTIME) $(mcs_topdir)/class/lib/default/mcs.exe --unsafe -nowarn:0162
14 ILASM = $(RUNTIME) $(mcs_topdir)/ilasm/ilasm.exe
16 BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
51 valuetype-gettype.cs \
53 static-constructor.cs \
67 invoke-string-ctors.cs \
95 reflection-const-field.cs \
124 appdomain-client.cs \
125 appdomain-unload.cs \
162 test-byval-in-struct.cs \
186 PLATFORM_DISABLED_TESTS=
190 $(PLATFORM_DISABLED_TESTS)
192 # These only compile with MS CSC
209 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
210 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
211 TESTBS=$(BENCHSRC:.cs=.exe)
213 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC) $(BENCHSRC)
218 %.exe: %.cs TestDriver.dll
219 $(CSC) -r:TestDriver.dll -out:$@ $<
224 $(CSC) -target:library -o $@ $(srcdir)/../mini/TestDriver.cs
226 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
229 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
230 for i in $(TESTSI_CS); do \
231 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
233 passed=`expr $${passed} + 1`; \
235 if [ $$? = 2 ]; then break; fi; \
236 failed=`expr $${failed} + 1`; \
239 echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo
241 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
244 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
245 for i in $(TESTSI_IL); do \
246 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
248 passed=`expr $${passed} + 1`; \
250 if [ $$? = 2 ]; then break; fi; \
251 failed=`expr $${failed} + 1`; \
254 echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) failed."; echo
256 testb: $(TEST_PROG) $(TESTBS)
257 for i in $(TESTBS); do \
258 $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
261 testjit: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la
265 for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do \
267 if $(srcdir)/test-driver '$(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
269 passed=`expr $${passed} + 1`; \
271 if [ $$? = 2 ]; then break; fi; \
272 failed=`expr $${failed} + 1`; \
273 failed_tests="$${failed_tests} $$i"; \
276 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
277 if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi;
279 testaot: $(TESTSI_CS) $(TESTBS) libtest.la
283 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
284 for i in $(TESTSI_CS) $(TESTBS); do \
286 $(JITTEST_PROG) --aot $${i} > /dev/null; \
287 if $(srcdir)/test-driver '$(JITTEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(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 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
303 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
304 for i in $(TESTSI_CS) $(TESTSI_IL); do \
305 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
307 passed=`expr $${passed} + 1`; \
309 if [ $$? = 2 ]; then break; fi; \
310 failed=`expr $${failed} + 1`; \
311 failed_tests="$${failed_tests} $$i"; \
314 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
315 if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; for i in $${failed_tests}; do echo $${i}; done; fi ;
317 testjitspeed: $(JITTEST_PROG) $(TESTBS)
318 for i in $(TESTBS); do \
320 time $(JITTEST_PROG) $$i; \
323 noinst_LTLIBRARIES = libtest.la
325 INCLUDES = $(GLIB_CFLAGS)
327 libtest_la_LDFLAGS = -rpath `pwd`
328 libtest_la_SOURCES = libtest.c
329 libtest_la_LIBADD = $(GLIB_LIBS)
331 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) *.dll *.stdout *.exe stest.dat