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
58 valuetype-gettype.cs \
60 static-constructor.cs \
74 invoke-string-ctors.cs \
102 reflection-const-field.cs \
131 appdomain-client.cs \
132 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
335 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
339 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
340 for i in $(TESTSI_CS) $(TESTSI_IL); do \
341 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
343 passed=`expr $${passed} + 1`; \
345 if [ $$? = 2 ]; then break; fi; \
346 failed=`expr $${failed} + 1`; \
347 failed_tests="$${failed_tests} $$i"; \
350 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
351 if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
352 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
354 testjitspeed: $(JITTEST_PROG) $(TESTBS)
355 for i in $(TESTBS); do \
357 time $(JITTEST_PROG) $$i; \
360 stresstest: $(STRESS_TESTS)
364 for i in $(STRESS_TESTS); do \
365 if $(srcdir)/stress-runner.pl $$i ../mini/mono $(RUNTIME_ARGS); \
367 passed=`expr $${passed} + 1`; \
369 if [ $$? = 2 ]; then break; fi; \
370 failed=`expr $${failed} + 1`; \
371 failed_tests="$${failed_tests} $$i"; \
374 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
375 if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
376 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
378 noinst_LTLIBRARIES = libtest.la
380 INCLUDES = $(GLIB_CFLAGS)
383 # the exported names created by gcc for stdcall functions are missing the leading _, so MS.NET
384 # can't find them. So we use --kill-at to remove the @ suffix as well.
385 libtest_la_LDFLAGS=-no-undefined -rpath `pwd` -Wl,--kill-at
387 libtest_la_LDFLAGS = -rpath `pwd`
389 libtest_la_SOURCES = libtest.c
390 libtest_la_LIBADD = $(GLIB_LIBS)
392 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) $(STRESS_TESTS) *.dll *.stdout *.exe stest.dat