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 \
74 invoke-string-ctors.cs \
102 reflection-const-field.cs \
131 appdomain-client.cs \
132 appdomain-unload.cs \
167 test-byval-in-struct.cs \
172 thread-static-init.cs \
192 delegate-async-exit.cs \
193 delegate-delegate-exit.cs \
196 finalizer-exception.cs \
199 main-returns-abort-resetabort.cs \
200 main-returns-background-abort-resetabort.cs \
201 main-returns-background-resetabort.cs \
202 main-returns-background.cs \
203 main-returns-background-change.cs \
210 PLATFORM_DISABLED_TESTS=finalizer-abort.exe finalizer-exception.exe finalizer-exit.exe
215 PLATFORM_DISABLED_TESTS=appdomain-unload.exe
219 delegate-async-exception.cs \
220 delegate-delegate-exception.cs \
221 $(PLATFORM_DISABLED_TESTS)
223 # These only compile with MS CSC
237 static-fields-nonconst.il \
241 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
242 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
243 TESTBS=$(BENCHSRC:.cs=.exe)
244 STRESS_TESTS=$(STRESS_TESTS_SRC:.cs=.exe)
246 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC) $(BENCHSRC) $(STRESS_TESTS_SRC) stress-runner.pl
251 %.exe: %.cs TestDriver.dll
252 $(CSC) -r:TestDriver.dll -out:$@ $<
257 $(CSC) -target:library -o $@ $(srcdir)/../mini/TestDriver.cs
259 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
262 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
263 for i in $(TESTSI_CS); do \
264 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
266 passed=`expr $${passed} + 1`; \
268 if [ $$? = 2 ]; then break; fi; \
269 failed=`expr $${failed} + 1`; \
272 echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo
274 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
277 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
278 for i in $(TESTSI_IL); do \
279 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
281 passed=`expr $${passed} + 1`; \
283 if [ $$? = 2 ]; then break; fi; \
284 failed=`expr $${failed} + 1`; \
287 echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) failed."; echo
289 testb: $(TEST_PROG) $(TESTBS)
290 for i in $(TESTBS); do \
291 $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
294 testjit: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la
298 for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do \
300 if $(srcdir)/test-driver '$(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
302 passed=`expr $${passed} + 1`; \
304 if [ $$? = 2 ]; then break; fi; \
305 failed=`expr $${failed} + 1`; \
306 failed_tests="$${failed_tests} $$i"; \
309 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
310 if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
311 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
313 testaot: $(TESTSI_CS) $(TESTBS) libtest.la
317 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
318 for i in $(TESTSI_CS) $(TESTBS); do \
320 $(JITTEST_PROG) --aot $${i} > /dev/null; \
321 if $(srcdir)/test-driver '$(JITTEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
323 passed=`expr $${passed} + 1`; \
325 if [ $$? = 2 ]; then break; fi; \
326 failed=`expr $${failed} + 1`; \
327 failed_tests="$${failed_tests} $$i"; \
330 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
331 if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
332 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
335 $(MAKE) RUNTIME_ARGS="$${RUNTIME_ARGS} --trace" testjit
337 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
341 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
342 for i in $(TESTSI_CS) $(TESTSI_IL); do \
343 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
345 passed=`expr $${passed} + 1`; \
347 if [ $$? = 2 ]; then break; fi; \
348 failed=`expr $${failed} + 1`; \
349 failed_tests="$${failed_tests} $$i"; \
352 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
353 if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
354 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
356 testjitspeed: $(JITTEST_PROG) $(TESTBS)
357 for i in $(TESTBS); do \
359 time $(JITTEST_PROG) $$i; \
362 stresstest: $(STRESS_TESTS)
366 for i in $(STRESS_TESTS); do \
367 if $(srcdir)/stress-runner.pl $$i ../mini/mono $(RUNTIME_ARGS); \
369 passed=`expr $${passed} + 1`; \
371 if [ $$? = 2 ]; then break; fi; \
372 failed=`expr $${failed} + 1`; \
373 failed_tests="$${failed_tests} $$i"; \
376 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
377 if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
378 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
380 noinst_LTLIBRARIES = libtest.la
382 INCLUDES = $(GLIB_CFLAGS)
385 # the exported names created by gcc for stdcall functions are missing the leading _, so MS.NET
386 # can't find them. So we use --kill-at to remove the @ suffix as well.
387 libtest_la_LDFLAGS=-no-undefined -rpath `pwd` -Wl,--kill-at
389 libtest_la_LDFLAGS = -rpath `pwd`
391 libtest_la_SOURCES = libtest.c
392 libtest_la_LIBADD = $(GLIB_LIBS)
394 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) $(STRESS_TESTS) *.dll *.stdout *.exe stest.dat