RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/default $(top_builddir)/runtime/mono-wrapper
-CSC = $(RUNTIME) $(mcs_topdir)/class/lib/default/mcs.exe --unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219
+CSC = $(RUNTIME) $(mcs_topdir)/class/lib/default/mcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219
ILASM = $(RUNTIME) $(mcs_topdir)/ilasm/ilasm.exe
BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
+STRESS_TESTS_SRC= \
+ abort-stress-1.cs \
+ abort-stress-2.cs \
+ domain-stress.cs \
+ gchandle-stress.cs \
+ monitor-stress.cs \
+ thread-stress.cs \
+ gc-stress.cs
+
TEST_CS_SRC= \
array-init.cs \
arraylist.cs \
pinvoke1.cs \
pinvoke2.cs \
pinvoke3.cs \
- pinvoke10.cs \
pinvoke11.cs \
pinvoke13.cs \
- pinvoke15.cs \
pinvoke17.cs \
pinvoke18.cs \
invoke.cs \
appdomain-unload.cs \
loader.cs \
pointer.cs \
- rounding.cs \
hashcode.cs \
delegate1.cs \
delegate2.cs \
delegate3.cs \
- delegate4.cs \
delegate5.cs \
delegate6.cs \
delegate7.cs \
main-returns-background-abort-resetabort.cs \
main-returns-background-resetabort.cs \
main-returns-background.cs \
+ main-returns-background-change.cs \
main-returns.cs \
subthread-exit.cs \
desweak.cs
TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
TESTBS=$(BENCHSRC:.cs=.exe)
+STRESS_TESTS=$(STRESS_TESTS_SRC:.cs=.exe)
-EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC) $(BENCHSRC)
+EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC) $(BENCHSRC) $(STRESS_TESTS_SRC) stress-runner.pl
%.exe: %.il
$(ILASM) -out:$@ $<
test: testjit
TestDriver.dll:
- $(CSC) -target:library -o $@ $(srcdir)/../mini/TestDriver.cs
+ $(CSC) -target:library -out:$@ $(srcdir)/../mini/TestDriver.cs
test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
@failed=0; \
if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
+testtrace:
+ $(MAKE) RUNTIME_ARGS="$${RUNTIME_ARGS} --trace" testjit
+
testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
@failed=0; \
passed=0; \
time $(JITTEST_PROG) $$i; \
done
+stresstest: $(STRESS_TESTS)
+ @failed=0; \
+ passed=0; \
+ failed_tests="";\
+ for i in $(STRESS_TESTS); do \
+ if $(srcdir)/stress-runner.pl $$i ../mini/mono $(RUNTIME_ARGS); \
+ then \
+ passed=`expr $${passed} + 1`; \
+ else \
+ if [ $$? = 2 ]; then break; fi; \
+ failed=`expr $${failed} + 1`; \
+ failed_tests="$${failed_tests} $$i"; \
+ fi \
+ done; \
+ echo "$${passed} test(s) passed. $${failed} test(s) failed."; \
+ if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
+ for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
+
noinst_LTLIBRARIES = libtest.la
INCLUDES = $(GLIB_CFLAGS)
if PLATFORM_WIN32
-libtest_la_LDFLAGS=-no-undefined -rpath `pwd`
+# the exported names created by gcc for stdcall functions are missing the leading _, so MS.NET
+# can't find them. So we use --kill-at to remove the @ suffix as well.
+libtest_la_LDFLAGS=-no-undefined -rpath `pwd` -Wl,--kill-at
else
libtest_la_LDFLAGS = -rpath `pwd`
endif
libtest_la_SOURCES = libtest.c
libtest_la_LIBADD = $(GLIB_LIBS)
-CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) *.dll *.stdout *.exe stest.dat
+CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) $(STRESS_TESTS) *.dll *.stdout *.exe stest.dat