SUBDIRS = cas assemblyresolve gc-descriptors
-check-local: test
+check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test_platform test-process-exit test-messages rm-empty-logs
+check-full: test-sgen check-local
+check-parallel: compile-tests check-full
+
+# for backwards compatibility on Wrench
+test-wrench: check-parallel
aotcheck: testaot gshared-aot
PKG_CONFIG_PATH=$(top_builddir):$(PKG_CONFIG_PATH) \
$(RUNTIME) $(mcs_topdir)/class/lib/net_4_5/mkbundle.exe
-MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug
+MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -debug \
+ -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 \
+ -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 \
+ -nowarn:0197
ILASM = $(RUNTIME) $(mcs_topdir)/class/lib/net_4_5/ilasm.exe
BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
bug-6148.cs \
assembly_append_ordering.cs \
bug-10127.cs \
+ bug-18026.cs \
allow-synchronous-major.cs \
unload-appdomain-on-shutdown.cs \
block_guard_restore_aligment_on_exit.cs \
- finally_block_ending_in_dead_bb.cs
+ finally_block_ending_in_dead_bb.cs \
+ thread_static_gc_layout.cs \
+ sleep.cs
TEST_CS_SRC_DIST= \
$(BASE_TEST_CS_SRC) \
if NACL_CODEGEN
test-messages:
else
+if HOST_WIN32
+test-messages:
+else
test-messages: w32message.exe
> test_messages.zero
$(with_mono_path) $(JITTEST_PROG_RUN) w32message.exe >& w32message.allout && cmp test_messages.zero w32message.allout
endif
+endif
if AMD64
test-sgen : sgen-tests
compile-tests:
$(MAKE) -j4 $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
-test: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test_platform test-process-exit test-messages rm-empty-logs
-test-wrench: compile-tests assemblyresolve/test/asm.dll testjit-wrench test-generic-sharing test-type-load test_platform test-process-exit test-sgen test-messages rm-empty-logs
-
# Remove empty .stdout and .stderr files for wrench
rm-empty-logs:
@echo "Removing empty logs..."
test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
@failed=0; \
passed=0; \
+ if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+ if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
for i in $(TESTSI_CS); do \
- if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' 'no-dump' $(RUNTIME_ARGS); \
+ if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS); \
then \
passed=`expr $${passed} + 1`; \
else \
test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
@failed=0; \
passed=0; \
+ if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+ if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
for i in $(TESTSI_IL); do \
- if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" 'no-dump' $(RUNTIME_ARGS); \
+ if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS); \
then \
passed=`expr $${passed} + 1`; \
else \
echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) did not pass."; echo
testb: $(TEST_PROG) $(TESTBS)
+ if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+ if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
for i in $(TESTBS); do \
- $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' 'no-dump' $(RUNTIME_ARGS); \
+ $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS); \
done
-runtest-wrench: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
- @failed=0; \
- passed=0; \
- failed_tests="";\
- for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do \
- rm -f $${i}.so; \
- if [ x$(AOT) = x1 ]; then if echo $(AOT_DISABLED_TESTS) | grep -v -q $${i}; then $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $${i} > $${i}.aotlog 2>&1 || exit 1; fi; fi; \
- if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS_WRENCH)' 'dump-output' $(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) did not pass."; \
- if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
- for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
-
-runtest-managed-wrench: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
- @$(RUNTIME) ./test-runner.exe -j a --disabled '$(DISABLED_TESTS_WRENCH)' $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
-
-testjit-wrench:
- @if test x$(M) != x; then $(MAKE) runtest-managed-wrench; else $(MAKE) runtest-wrench; fi
-
runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
@failed=0; \
passed=0; \
failed_tests="";\
- for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do \
+ if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+ if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
+ rm -f testlist testlist.sorted; \
+ for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do echo $${i} >> testlist; sort testlist > testlist.sorted; done; \
+ for i in `cat testlist.sorted`; do \
rm -f $${i}.so; \
if [ x$(AOT) = x1 ]; then if echo $(AOT_DISABLED_TESTS) | grep -v -q $${i}; then $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $${i} > $${i}.aotlog 2>&1 || exit 1; fi; fi; \
- if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' 'no-dump' $(RUNTIME_ARGS); \
+ if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS); \
then \
passed=`expr $${passed} + 1`; \
else \
fi \
done; \
echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
- if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
- for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
+ rm -f testlist testlist.sorted; \
+ if [ $${failed} != 0 ]; then \
+ echo -e "\nFailed tests:\n"; \
+ for i in $${failed_tests}; do \
+ echo $${i}; \
+ if [ "x$$V" = "x1" ]; then \
+ cat $${i}.stdout; \
+ cat $${i}.stderr; \
+ fi; \
+ done; \
+ exit 1; \
+ fi
runtest-managed: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
- @$(RUNTIME) ./test-runner.exe -j a --disabled '$(DISABLED_TESTS)' $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
+ if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
+ @$(RUNTIME) ./test-runner.exe -j a --disabled '$${disabled_tests}' $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
testjit:
@if test x$(M) != x; then $(MAKE) runtest-managed; else $(MAKE) runtest; fi
@$(MCS) -r:TestDriver.dll $(srcdir)/debug-casts.cs
@$(RUNTIME) --debug=casts debug-casts.exe
-EXTRA_DIST += sgen-bridge.cs sgen-descriptors.cs sgen-gshared-vtype.cs sgen-bridge-major-fragmentation.cs sgen-domain-unload.cs sgen-weakref-stress.cs sgen-cementing-stress.cs sgen-case-23400.cs finalizer-wait.cs critical-finalizers.cs sgen-domain-unload-2.cs sgen-suspend.cs
+EXTRA_DIST += sgen-bridge.cs sgen-descriptors.cs sgen-gshared-vtype.cs sgen-bridge-major-fragmentation.cs sgen-domain-unload.cs sgen-weakref-stress.cs sgen-cementing-stress.cs sgen-case-23400.cs finalizer-wait.cs critical-finalizers.cs sgen-domain-unload-2.cs sgen-suspend.cs sgen-new-threads-dont-join-stw.cs sgen-bridge-xref.cs bug-17590.cs sgen-toggleref.cs
#those are actually configurations, eg plain_sgen-descriptors.exe
sgen-domain-unload.exe \
sgen-weakref-stress.exe \
sgen-cementing-stress.exe \
- sgen-case-23400.exe
+ sgen-case-23400.exe \
+ sgen-new-threads-dont-join-stw.exe \
+ bug-17590.exe
SGEN_CONFIGURATIONS = \
"|plain" \
@failed=0; \
passed=0; \
failed_tests="";\
+ if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
for test in $+; do \
echo "...$$test"; \
for conf in $(SGEN_CONFIGURATIONS); do \
name=`echo $$conf | cut -d\| -f 2`; \
params=`echo $$conf | cut -d\| -f 1`; \
test_name="$${test}|$${name}"; \
- if MONO_GC_PARAMS="$$params" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" 'dump-output' $(RUNTIME_ARGS); \
+ if MONO_GC_PARAMS="$$params" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" "$${dump_action}" $(RUNTIME_ARGS); \
+ then \
+ passed=`expr $${passed} + 1`; \
+ else \
+ if [ $$? = 2 ]; then break; fi; \
+ failed=`expr $${failed} + 1`; \
+ failed_tests="$${failed_tests} $$test_name"; \
+ fi \
+ done \
+ done; \
+ echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
+ if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
+ for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
+
+sgen-bridge-tests1: sgen-bridge.exe sgen-bridge-major-fragmentation.exe
+ @failed=0; \
+ passed=0; \
+ failed_tests="";\
+ if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+ for test in $+; do \
+ echo "...$$test"; \
+ for conf in $(SGEN_BRIDGE_CONFIGURATIONS); do \
+ name=`echo $$conf | cut -d\| -f 2`; \
+ params=`echo $$conf | cut -d\| -f 1`; \
+ test_name="$${test}|$${name}"; \
+ if MONO_GC_PARAMS="bridge=Bridge$${params}" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" "$${dump_action}" $(RUNTIME_ARGS); \
then \
passed=`expr $${passed} + 1`; \
else \
if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
-sgen-bridge-tests: sgen-bridge.exe sgen-bridge-major-fragmentation.exe
+sgen-bridge-tests2: sgen-bridge-xref.exe
@failed=0; \
passed=0; \
failed_tests="";\
+ if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
for test in $+; do \
echo "...$$test"; \
for conf in $(SGEN_BRIDGE_CONFIGURATIONS); do \
name=`echo $$conf | cut -d\| -f 2`; \
params=`echo $$conf | cut -d\| -f 1`; \
test_name="$${test}|$${name}"; \
- if MONO_GC_PARAMS="bridge=Bridge$${params}" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" 'dump-output' $(RUNTIME_ARGS); \
+ if MONO_GC_PARAMS="bridge=2Bridge$${params}" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" "$${dump_action}" $(RUNTIME_ARGS); \
then \
passed=`expr $${passed} + 1`; \
else \
if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
-sgen-tests: sgen-regular-tests sgen-bridge-tests
+sgen-toggleref-tests: sgen-toggleref.exe
+ @failed=0; \
+ passed=0; \
+ failed_tests="";\
+ if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+ for test in $+; do \
+ echo "...$$test"; \
+ for conf in $(SGEN_CONFIGURATIONS); do \
+ name=`echo $$conf | cut -d\| -f 2`; \
+ params=`echo $$conf | cut -d\| -f 1`; \
+ test_name="$${test}|$${name}"; \
+ if MONO_GC_PARAMS="toggleref-test,$$params" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" "$${dump_action}" $(RUNTIME_ARGS); \
+ then \
+ passed=`expr $${passed} + 1`; \
+ else \
+ if [ $$? = 2 ]; then break; fi; \
+ failed=`expr $${failed} + 1`; \
+ failed_tests="$${failed_tests} $$test_name"; \
+ fi \
+ done \
+ done; \
+ echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
+ if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
+ for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
+
+sgen-bridge-tests: sgen-bridge-tests1 sgen-bridge-tests2
+
+sgen-tests: sgen-regular-tests sgen-bridge-tests sgen-toggleref-tests
+
+AOT_CONFIGURATIONS= \
+ "|regular" \
+ "--gc=boehm|boehm"
+
+#LLVM crashes, got to fix it first.
+# "--llvm|llvm" \
+# "--llvm --gc=boehm|llvm+boehm"
+
+
+test-aot:
+ @failed=0; \
+ passed=0; \
+ failed_tests="";\
+ profile=net_4_5; \
+ tmpfile=`mktemp -t mono_aot_output` || exit 1; \
+ rm -f test-aot-$${name}.stdout test-aot-$${name}.stderr; \
+ for assembly in $(mcs_topdir)/class/lib/$$profile/*.dll ; do \
+ asm_name=`basename $$assembly`; \
+ echo "... $$asm_name"; \
+ for conf in $(AOT_CONFIGURATIONS); do \
+ name=`echo $$conf | cut -d\| -f 2`; \
+ params=`echo $$conf | cut -d\| -f 1`; \
+ test_name="$${asm_name}|$${name}"; \
+ echo " $$test_name"; \
+ if MONO_PATH=$(mcs_topdir)/class/lib/$$profile $(JITTEST_PROG_RUN) $$params --aot=outfile=$$tmpfile $$assembly >> test-aot-$${name}.stdout 2>> test-aot-$${name}.stderr; \
+ then \
+ passed=`expr $${passed} + 1`; \
+ else \
+ failed=`expr $${failed} + 1`; \
+ failed_tests="$${failed_tests} $$test_name"; \
+ fi \
+ done; \
+ done; \
+ rm $$tmpfile; \
+ echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
+ if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
+ for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
# Generated tests for runtime invoke