Merge pull request #249 from pcc/xgetinputfocus
[mono.git] / mono / tests / Makefile.am
index bafdd391da490e9273232f171969a7be120dbe5b..971cb1681255a2bfaf276d63fea39f1a1805c60b 100644 (file)
@@ -13,7 +13,7 @@ JITTEST_PROG_RUN = MONO_SHARED_DIR=$(mono_build_root)/runtime MONO_CFG_DIR=$(mon
 
 RUNTIME_ARGS=--config tests-config --optimize=all --debug
 
-with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/net_2_0
+with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/net_4_5
 with_mono_path_moonlight = MONO_PATH=$(mcs_topdir)/class/lib/moonlight_raw
 
 RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
@@ -21,11 +21,10 @@ RUNTIME_MOONLIGHT = $(with_mono_path_moonlight) $(top_builddir)/runtime/mono-wra
 
 MKBUNDLE = \
        PKG_CONFIG_PATH=$(top_builddir):$(PKG_CONFIG_PATH) \
-       $(RUNTIME) $(mcs_topdir)/class/lib/net_2_0/mkbundle.exe
+       $(RUNTIME) $(mcs_topdir)/class/lib/net_4_5/mkbundle.exe
 
-MCS = $(RUNTIME) $(mcs_topdir)/class/lib/net_2_0/gmcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug
-SMCS = $(RUNTIME_MOONLIGHT) --runtime=moonlight --security=temporary-smcs-hack $(mcs_topdir)/class/lib/moonlight_raw/smcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219
-ILASM = $(RUNTIME) $(mcs_topdir)/class/lib/net_2_0/ilasm.exe
+MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug
+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
 
@@ -370,22 +369,36 @@ BASE_TEST_CS_SRC=         \
        bug-562150.cs   \
        bug-575941.cs   \
        bug-599469.cs   \
-       bug-389886-3.cs
+       bug-389886-3.cs \
+       monitor.cs      \
+       dynamic-method-resurrection.cs  \
+       bug-666008.cs   \
+       bug-685908.cs   \
+       sgen-long-vtype.cs      \
+       delegate-invoke.cs      \
+       bug-696593.cs   \
+       bug-705140.cs   \
+       bug-1147.cs     \
+       mono-path.cs    \
+       bug-bxc-795.cs
 
 TEST_CS_SRC_DIST=      \
        $(BASE_TEST_CS_SRC)     \
        async-exc-compilation.cs \
-       filter-stack.cs
+       filter-stack.cs \
+       finally_guard.cs
 
 TEST_CS_SRC_GEN = \
        runtime-invoke.gen.cs \
        imt_big_iface_test.cs
 
 if AMD64
-TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs
+TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs finally_guard.cs
+# #651684
+PLATFORM_DISABLED_TESTS = finally_guard.exe
 else
 if X86
-TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs
+TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs finally_guard.cs
 else
 TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN)
 endif
@@ -401,7 +414,7 @@ endif
 if X86
 
 if HOST_WIN32
-PLATFORM_DISABLED_TESTS=async-exc-compilation.exe
+PLATFORM_DISABLED_TESTS=async-exc-compilation.exe finally_guard.exe
 endif
 
 endif
@@ -415,9 +428,22 @@ if ARM
 PLATFORM_DISABLED_TESTS=filter-stack.exe
 endif
 
+if MIPS
+# monitor.exe is racy
+PLATFORM_DISABLED_TESTS=filter-stack.exe monitor.exe
+endif
+
+if S390x
+PLATFORM_DISABLED_TESTS=dynamic-method-resurrection.exe
+#PLATFORM_DISABLED_TESTS=dynamic-method-resurrection.exe exception17.exe
+endif
+
 # The two finalizer tests only work under sgen
 # gc-altstack.exe fails under boehm because it has no support for altstack
 # bug-459094.exe creates an extremely deep directory tree
+# delegate-invoke.exe depends on 929c6bc9b6d76a273f251e6f5dfacac36e9c38bd which was
+# reverted.
+# generic_type_definition.2.exe depends on COMPILER_ACCESS which is no longer supported.
 DISABLED_TESTS=                        \
        delegate-async-exception.exe    \
        bug-348522.2.exe        \
@@ -425,6 +451,8 @@ DISABLED_TESTS=                     \
        critical-finalizers.exe \
        gc-altstack.exe \
        bug-459094.exe \
+       delegate-invoke.exe \
+       generic_type_definition.2.exe \
        $(PLATFORM_DISABLED_TESTS)
 
 AOT_DISABLED_TESTS=constraints-load.exe
@@ -497,9 +525,8 @@ TEST_IL_SRC=                        \
        interface-with-static-method.il \
        bug-515884.il   \
        bug-633291.il   \
-       delegate-with-null-target.il
-
-#      bug-318677.il
+       delegate-with-null-target.il    \
+       bug-318677.il
 
 # pre-requisite test sources: files that are not test themselves
 # but that need to be compiled
@@ -526,7 +553,7 @@ EXTRA_DIST=test-driver $(TEST_CS_SRC_DIST) $(TEST_IL_SRC) \
 
 # mkbundle works on ppc, but the pkg-config POC doesn't when run with make test
 if POWERPC
-test_platform: testbundle
+test_platform:
 else
 # Can't use mkbundle on win32 since there is no static build there
 # Can't run test-unhandled-exception on Windows because of all the debug popups...
@@ -539,6 +566,24 @@ test_platform:     test-iomap-regression
 endif
 endif
 
+if X86
+if HOST_WIN32
+else
+test_platform: test-eglib-remap
+endif
+endif
+
+# Target to precompile the test executables
+tests: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS) $(GSHARED_TESTS)
+
+#
+# Test that no symbols are missed in eglib-remap.h
+#
+OK_G_SYMBOLS='g_list\|g_slist\|g_concat_dir_and_file'
+test-eglib-remap:
+       @echo "Testing eglib remap..."
+       @if which nm > /dev/null; then if nm $(top_builddir)/mono/mini/mono | grep -v $(OK_G_SYMBOLS) | grep 't g_'; then exit 1; else exit 0; fi; fi
+
 #
 # Tests that the internals in mono/io-layer/messages.c are ok by triggering the 
 # code that checks that the table is properly sorted
@@ -553,9 +598,25 @@ else
 test_2_1 :
 endif
 
+if AMD64
+test-sgen : sgen-tests
+else
+if X86
+test-sgen : sgen-tests
+else
+if ARM
+test-sgen : sgen-tests
+else
+if S390x
+test-sgen : sgen-regular-tests
+endif
+endif
+endif
+endif
+
 # test_messages fails on the buildbots
 #test: assemblyresolve/test/asm.dll testjit test-type-load test-generic-sharing test_platform test_2_1 test_messages
-test: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test_platform test_2_1 test-process-exit
+test: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test_platform test_2_1 test-process-exit test-sgen
 
 assemblyresolve/test/asm.dll:
        $(MAKE) -C assemblyresolve prereq
@@ -675,6 +736,28 @@ test-type-load: TestDriver.dll
        @echo "Testing load-exception.exe..."
        @$(RUNTIME) load-exceptions.exe > load-exceptions.exe.stdout 2> load-exceptions.exe.stderr
 
+
+EXTRA_DIST += sgen-bridge.cs sgen-descriptors.cs sgen-gshared-vtype.cs sgen-bridge-major-fragmentation.cs
+
+SGEN_TESTS =   \
+       sgen-descriptors.exe    \
+       sgen-gshared-vtype.exe
+
+sgen-regular-tests: $(SGEN_TESTS)
+       @for fn in $+ ; do      \
+               echo "Testing $$fn ...";        \
+               MONO_GC_PARAMS=major=marksweep-par MONO_ENV_OPTIONS="--gc=sgen" $(RUNTIME) $$fn > $$fn.stdout || exit 1;        \
+               MONO_ENV_OPTIONS="--gc=sgen"                                    $(RUNTIME) $$fn > $$fn.stdout || exit 1;        \
+       done
+
+
+sgen-tests: sgen-regular-tests sgen-bridge.exe sgen-bridge-major-fragmentation.exe
+       @echo "Testing sgen-bridge.exe ...";    \
+       MONO_GC_PARAMS=bridge=Bridge MONO_ENV_OPTIONS="--gc=sgen" $(RUNTIME) sgen-bridge.exe > sgen-bridge.exe.stdout 2> sgen-bridge.exe.stderr
+       @echo "Testing sgen-bridge-major-fragmentation.exe ...";        \
+       MONO_GC_PARAMS=bridge=Bridge MONO_ENV_OPTIONS="--gc=sgen" $(RUNTIME) sgen-bridge-major-fragmentation.exe > sgen-bridge-major-fragmentation.exe.stdout 2> sgen-bridge-major-fragmentation.exe.stderr
+
+
 # Generated tests for runtime invoke
 EXTRA_DIST += gen-runtime-invoke.cs
 runtime-invoke.gen.exe: TestDriver.dll gen-runtime-invoke.exe
@@ -828,7 +911,8 @@ GSHARED_TESTS = \
                generic-stack-traces.2.exe generic-stack-traces2.2.exe          \
                bug-472600.2.exe bug-473482.2.exe bug-473999.2.exe              \
                bug-479763.2.exe generic-xdomain.2.exe                          \
-               generic-type-load-exception.2.exe bug-616463.exe
+               generic-type-load-exception.2.exe bug-616463.exe        \
+               bug-1147.exe
 
 test-generic-sharing-normal: $(GSHARED_TESTS)
        @for fn in $+ ; do      \
@@ -871,7 +955,21 @@ test-process-exit:
        @$(MCS) $(srcdir)/bug-438454.cs -out:bug-438454.exe
        @echo "Testing bug-438454.exe..."
        @$(RUNTIME) bug-438454.exe > bug-438454.exe.stdout
-       @diff bug-438454.exe.stdout $(srcdir)/bug-438454.exe.stdout.expected
+       @diff -w bug-438454.exe.stdout $(srcdir)/bug-438454.exe.stdout.expected
+
+OOM_TESTS =    \
+       gc-oom-handling.exe     \
+       gc-oom-handling2.exe
+
+
+test-oom: $(OOM_TESTS)
+       @for fn in $+ ; do      \
+               echo "Testing $$fn ...";        \
+               MONO_GC_PARAMS=max-heap-size=16m,major=marksweep-par MONO_ENV_OPTIONS="--gc=sgen" $(RUNTIME) $$fn > $$fn.stdout || exit 1;      \
+               MONO_GC_PARAMS=max-heap-size=16m MONO_ENV_OPTIONS="--gc=sgen"                     $(RUNTIME) $$fn > $$fn.stdout || exit 1;      \
+               MONO_GC_PARAMS=max-heap-size=16m                                                  $(RUNTIME) $$fn > $$fn.stdout || exit 1;      \
+       done
+
 
 noinst_LTLIBRARIES = libtest.la
 
@@ -888,6 +986,6 @@ else
 libtest_la_LDFLAGS = -rpath `pwd`
 endif
 libtest_la_SOURCES = libtest.c
-libtest_la_LIBADD = $(GLIB_LIBS)
+libtest_la_LIBADD = $(GLIB_LIBS) $(LIBICONV)
 
 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) $(STRESS_TESTS) *.dll *.stdout *.aotlog *.exe stest.dat