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 -nowarn:0168 -nowarn:0219
14 ILASM = $(RUNTIME) $(mcs_topdir)/ilasm/ilasm.exe
16 BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
60 valuetype-gettype.cs \
62 static-constructor.cs \
76 invoke-string-ctors.cs \
104 reflection-const-field.cs \
133 appdomain-client.cs \
134 appdomain-unload.cs \
169 test-byval-in-struct.cs \
174 thread-static-init.cs \
194 delegate-async-exit.cs \
195 delegate-delegate-exit.cs \
198 finalizer-exception.cs \
201 main-returns-abort-resetabort.cs \
202 main-returns-background-abort-resetabort.cs \
203 main-returns-background-resetabort.cs \
204 main-returns-background.cs \
211 PLATFORM_DISABLED_TESTS=finalizer-abort.exe finalizer-exception.exe finalizer-exit.exe
216 PLATFORM_DISABLED_TESTS=appdomain-unload.exe
220 delegate-async-exception.cs \
221 delegate-delegate-exception.cs \
222 $(PLATFORM_DISABLED_TESTS)
224 # These only compile with MS CSC
238 static-fields-nonconst.il \
242 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
243 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
244 TESTBS=$(BENCHSRC:.cs=.exe)
245 STRESS_TESTS=$(STRESS_TESTS_SRC:.cs=.exe)
247 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC) $(BENCHSRC) $(STRESS_TESTS_SRC) stress-runner.pl
252 %.exe: %.cs TestDriver.dll
253 $(CSC) -r:TestDriver.dll -out:$@ $<
258 $(CSC) -target:library -o $@ $(srcdir)/../mini/TestDriver.cs
260 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
263 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
264 for i in $(TESTSI_CS); do \
265 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
267 passed=`expr $${passed} + 1`; \
269 if [ $$? = 2 ]; then break; fi; \
270 failed=`expr $${failed} + 1`; \
273 echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo
275 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
278 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
279 for i in $(TESTSI_IL); do \
280 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
282 passed=`expr $${passed} + 1`; \
284 if [ $$? = 2 ]; then break; fi; \
285 failed=`expr $${failed} + 1`; \
288 echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) failed."; echo
290 testb: $(TEST_PROG) $(TESTBS)
291 for i in $(TESTBS); do \
292 $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
295 testjit: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la
299 for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do \
301 if $(srcdir)/test-driver '$(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
303 passed=`expr $${passed} + 1`; \
305 if [ $$? = 2 ]; then break; fi; \
306 failed=`expr $${failed} + 1`; \
307 failed_tests="$${failed_tests} $$i"; \
310 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
311 if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
312 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
314 testaot: $(TESTSI_CS) $(TESTBS) libtest.la
318 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
319 for i in $(TESTSI_CS) $(TESTBS); do \
321 $(JITTEST_PROG) --aot $${i} > /dev/null; \
322 if $(srcdir)/test-driver '$(JITTEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
324 passed=`expr $${passed} + 1`; \
326 if [ $$? = 2 ]; then break; fi; \
327 failed=`expr $${failed} + 1`; \
328 failed_tests="$${failed_tests} $$i"; \
331 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
332 if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
333 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
336 $(MAKE) RUNTIME_ARGS="$${RUNTIME_ARGS} --trace" testjit
338 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
342 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
343 for i in $(TESTSI_CS) $(TESTSI_IL); do \
344 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
346 passed=`expr $${passed} + 1`; \
348 if [ $$? = 2 ]; then break; fi; \
349 failed=`expr $${failed} + 1`; \
350 failed_tests="$${failed_tests} $$i"; \
353 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
354 if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
355 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
357 testjitspeed: $(JITTEST_PROG) $(TESTBS)
358 for i in $(TESTBS); do \
360 time $(JITTEST_PROG) $$i; \
363 stresstest: $(STRESS_TESTS)
367 for i in $(STRESS_TESTS); do \
368 if $(srcdir)/stress-runner.pl $$i ../mini/mono $(RUNTIME_ARGS); \
370 passed=`expr $${passed} + 1`; \
372 if [ $$? = 2 ]; then break; fi; \
373 failed=`expr $${failed} + 1`; \
374 failed_tests="$${failed_tests} $$i"; \
377 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
378 if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
379 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
381 noinst_LTLIBRARIES = libtest.la
383 INCLUDES = $(GLIB_CFLAGS)
386 # the exported names created by gcc for stdcall functions are missing the leading _, so MS.NET
387 # can't find them. So we use --kill-at to remove the @ suffix as well.
388 libtest_la_LDFLAGS=-no-undefined -rpath `pwd` -Wl,--kill-at
390 libtest_la_LDFLAGS = -rpath `pwd`
392 libtest_la_SOURCES = libtest.c
393 libtest_la_LIBADD = $(GLIB_LIBS)
395 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) $(STRESS_TESTS) *.dll *.stdout *.exe stest.dat