3 TEST_PROG = ../interpreter/mint
4 JITTEST_PROG = ../mini/mono
6 TEST_PROG_RUN = MONO_PATH=$(mcs_topdir)/class/lib/default MONO_SHARED_DIR=$(mono_build_root)/runtime $(LIBTOOL) --mode=execute $(TEST_PROG)
7 JITTEST_PROG_RUN = MONO_PATH=$(mcs_topdir)/class/lib/default MONO_SHARED_DIR=$(mono_build_root)/runtime $(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 \
167 thread-static-init.cs \
187 delegate-async-exit.cs \
188 delegate-delegate-exit.cs \
191 finalizer-exception.cs \
194 main-returns-abort-resetabort.cs \
195 main-returns-background-abort-resetabort.cs \
196 main-returns-background-resetabort.cs \
197 main-returns-background.cs \
204 PLATFORM_DISABLED_TESTS=finalizer-abort.exe finalizer-exception.exe finalizer-exit.exe
209 PLATFORM_DISABLED_TESTS=appdomain-unload.exe
213 delegate-async-exception.cs \
214 delegate-delegate-exception.cs \
215 $(PLATFORM_DISABLED_TESTS)
217 # These only compile with MS CSC
234 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
235 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
236 TESTBS=$(BENCHSRC:.cs=.exe)
238 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC) $(BENCHSRC)
243 %.exe: %.cs TestDriver.dll
244 $(CSC) -r:TestDriver.dll -out:$@ $<
249 $(CSC) -target:library -o $@ $(srcdir)/../mini/TestDriver.cs
251 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
254 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
255 for i in $(TESTSI_CS); do \
256 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
258 passed=`expr $${passed} + 1`; \
260 if [ $$? = 2 ]; then break; fi; \
261 failed=`expr $${failed} + 1`; \
264 echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo
266 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
269 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
270 for i in $(TESTSI_IL); do \
271 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
273 passed=`expr $${passed} + 1`; \
275 if [ $$? = 2 ]; then break; fi; \
276 failed=`expr $${failed} + 1`; \
279 echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) failed."; echo
281 testb: $(TEST_PROG) $(TESTBS)
282 for i in $(TESTBS); do \
283 $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
286 testjit: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la
290 for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do \
292 if $(srcdir)/test-driver '$(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(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"; \
303 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
305 testaot: $(TESTSI_CS) $(TESTBS) libtest.la
309 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
310 for i in $(TESTSI_CS) $(TESTBS); do \
312 $(JITTEST_PROG) --aot $${i} > /dev/null; \
313 if $(srcdir)/test-driver '$(JITTEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
315 passed=`expr $${passed} + 1`; \
317 if [ $$? = 2 ]; then break; fi; \
318 failed=`expr $${failed} + 1`; \
319 failed_tests="$${failed_tests} $$i"; \
322 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
323 if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
324 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
326 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
330 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
331 for i in $(TESTSI_CS) $(TESTSI_IL); do \
332 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
334 passed=`expr $${passed} + 1`; \
336 if [ $$? = 2 ]; then break; fi; \
337 failed=`expr $${failed} + 1`; \
338 failed_tests="$${failed_tests} $$i"; \
341 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
342 if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
343 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
345 testjitspeed: $(JITTEST_PROG) $(TESTBS)
346 for i in $(TESTBS); do \
348 time $(JITTEST_PROG) $$i; \
351 noinst_LTLIBRARIES = libtest.la
353 INCLUDES = $(GLIB_CFLAGS)
356 libtest_la_LDFLAGS=-no-undefined -rpath `pwd`
358 libtest_la_LDFLAGS = -rpath `pwd`
360 libtest_la_SOURCES = libtest.c
361 libtest_la_LIBADD = $(GLIB_LIBS)
363 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) *.dll *.stdout *.exe stest.dat