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
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
231 static-fields-nonconst.il \
235 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
236 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
237 TESTBS=$(BENCHSRC:.cs=.exe)
239 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC) $(BENCHSRC)
244 %.exe: %.cs TestDriver.dll
245 $(CSC) -r:TestDriver.dll -out:$@ $<
250 $(CSC) -target:library -o $@ $(srcdir)/../mini/TestDriver.cs
252 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
255 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
256 for i in $(TESTSI_CS); do \
257 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
259 passed=`expr $${passed} + 1`; \
261 if [ $$? = 2 ]; then break; fi; \
262 failed=`expr $${failed} + 1`; \
265 echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo
267 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
270 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
271 for i in $(TESTSI_IL); do \
272 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
274 passed=`expr $${passed} + 1`; \
276 if [ $$? = 2 ]; then break; fi; \
277 failed=`expr $${failed} + 1`; \
280 echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) failed."; echo
282 testb: $(TEST_PROG) $(TESTBS)
283 for i in $(TESTBS); do \
284 $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
287 testjit: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la
291 for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do \
293 if $(srcdir)/test-driver '$(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
295 passed=`expr $${passed} + 1`; \
297 if [ $$? = 2 ]; then break; fi; \
298 failed=`expr $${failed} + 1`; \
299 failed_tests="$${failed_tests} $$i"; \
302 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
303 if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
304 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
306 testaot: $(TESTSI_CS) $(TESTBS) libtest.la
310 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
311 for i in $(TESTSI_CS) $(TESTBS); do \
313 $(JITTEST_PROG) --aot $${i} > /dev/null; \
314 if $(srcdir)/test-driver '$(JITTEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
316 passed=`expr $${passed} + 1`; \
318 if [ $$? = 2 ]; then break; fi; \
319 failed=`expr $${failed} + 1`; \
320 failed_tests="$${failed_tests} $$i"; \
323 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
324 if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
325 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
327 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
331 export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
332 for i in $(TESTSI_CS) $(TESTSI_IL); do \
333 if $(srcdir)/test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
335 passed=`expr $${passed} + 1`; \
337 if [ $$? = 2 ]; then break; fi; \
338 failed=`expr $${failed} + 1`; \
339 failed_tests="$${failed_tests} $$i"; \
342 echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
343 if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
344 for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
346 testjitspeed: $(JITTEST_PROG) $(TESTBS)
347 for i in $(TESTBS); do \
349 time $(JITTEST_PROG) $$i; \
352 noinst_LTLIBRARIES = libtest.la
354 INCLUDES = $(GLIB_CFLAGS)
357 libtest_la_LDFLAGS=-no-undefined -rpath `pwd`
359 libtest_la_LDFLAGS = -rpath `pwd`
361 libtest_la_SOURCES = libtest.c
362 libtest_la_LIBADD = $(GLIB_LIBS)
364 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) *.dll *.stdout *.exe stest.dat