[sgen] Add old forgotten oom tests to sgen oom suite
[mono.git] / mono / tests / Makefile.am
index 81113f07facb6a1c7cd41311d12a169722a6f618..885335de3469ece7153128370b1788f6b099b8c0 100644 (file)
@@ -1,13 +1,13 @@
-SUBDIRS = assemblyresolve gc-descriptors
+SUBDIRS = assemblyresolve gc-descriptors . testing_gac
 
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
 FEATUREFUL_RUNTIME_TEST =  
 else
 FEATUREFUL_RUNTIME_TEST = test-appdomain-unload
 endif
 
 check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test-multi-netmodule test-cattr-type-load test-reflection-load-with-context test_platform        \
-                test-console-output test-messages test-env-options test-unhandled-exception-2 $(FEATUREFUL_RUNTIME_TEST) test-process-stress rm-empty-logs
+                test-console-output test-env-options test-unhandled-exception-2 $(FEATUREFUL_RUNTIME_TEST) test-process-stress test-pedump rm-empty-logs runtest-gac-loading
 check-full: test-sgen check-local
 check-parallel: compile-tests check-full
 
@@ -19,13 +19,11 @@ test-wrench: check-parallel
 
 aotcheck: testaot gshared-aot
 
-TEST_PROG = ../interpreter/mint
-
 JITTEST_PROG = $(if $(VALGRIND), valgrind $(VALGRIND_ARGS),) $(if $(SGEN),$(top_builddir)/mono/mini/mono-sgen,$(top_builddir)/mono/mini/mono)
 
-TEST_PROG_RUN = MONO_CFG_DIR=$(mono_build_root)/runtime/etc $(LIBTOOL) --mode=execute $(TEST_PROG)
 JITTEST_PROG_RUN = MONO_CFG_DIR=$(mono_build_root)/runtime/etc $(LIBTOOL) --mode=execute $(JITTEST_PROG)
 
+
 RUNTIME_ARGS=--config tests-config --optimize=all --debug
 
 if HOST_WIN32
@@ -41,29 +39,38 @@ CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
 with_mono_path = MONO_PATH=$(CLASS)
 
 RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
+TOOLS_RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/build $(top_builddir)/runtime/mono-wrapper --aot-path=$(mcs_topdir)/class/lib/build
 
 MKBUNDLE = \
        PKG_CONFIG_PATH=$(top_builddir):$(PKG_CONFIG_PATH) \
        $(RUNTIME) $(CLASS)/mkbundle.exe
 
-if INSTALL_MOBILE_STATIC
-PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_STATIC,MOBILE_LEGACY 
+if FULL_AOT_TESTS
+PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY,FULL_AOT_DESKTOP 
+endif
+
+if HYBRID_AOT_TESTS
+PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY 
 endif
 
-MCS_NO_LIB = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -debug \
+MCS_NO_LIB = $(TOOLS_RUNTIME) $(CSC) -unsafe -debug:portable \
        -noconfig -nologo \
        -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 \
        -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 \
        -nowarn:0197 $(PROFILE_MCS_FLAGS)
 
-MCS = $(MCS_NO_LIB) -lib:$(CLASS)
+MCS = $(MCS_NO_LIB)
 
-ILASM = $(RUNTIME) $(CLASS)/ilasm.exe
+ILASM = $(TOOLS_RUNTIME) $(mcs_topdir)/class/lib/build/ilasm.exe
 
-if INSTALL_MOBILE_STATIC
-TEST_RUNNER = ./test-runner.exe --runtime $(top_builddir)/runtime/mono-wrapper --mono-path "$(CLASS)" --aot-run-flags "$(AOT_RUN_FLAGS)" --aot-build-flags "$(AOT_BUILD_FLAGS)"
-else
 TEST_RUNNER = ./test-runner.exe --runtime $(top_builddir)/runtime/mono-wrapper --mono-path "$(CLASS)"
+
+if FULL_AOT_TESTS
+TEST_RUNNER += --aot-run-flags "$(AOT_RUN_FLAGS)" --aot-build-flags "$(AOT_BUILD_FLAGS)"
+endif
+
+if HYBRID_AOT_TESTS
+TEST_RUNNER += --aot-run-flags "$(AOT_RUN_FLAGS)" --aot-build-flags "$(AOT_BUILD_FLAGS)"
 endif
 
 
@@ -84,70 +91,9 @@ STRESS_TESTS_SRC=    \
        process-stress.cs       \
        assembly-load-stress.cs
 
-BASE_TEST_MOBILE_STATIC_NOT_SUPPORTED= \
-       remoting4.cs    \
-       remoting1.cs    \
-       remoting2.cs    \
-       remoting3.cs    \
-       remoting5.cs    \
-       appdomain.cs    \
-       appdomain-client.cs     \
-       appdomain-unload.cs     \
-       appdomain-async-invoke.cs       \
-       appdomain-thread-abort.cs       \
-       appdomain1.cs   \
-       appdomain2.cs   \
-       appdomain-exit.cs       \
-       assemblyresolve_event2.2.cs     \
-       appdomain-unload-callback.cs    \
-       appdomain-unload-doesnot-raise-pending-events.cs        \
-       unload-appdomain-on-shutdown.cs \
-       bug-47295.cs    \
-       loader.cs       \
-       pinvoke2.cs     \
-       generic-type-builder.2.cs       \
-       dynamic-generic-size.cs \
-       cominterop.cs   \
-       dynamic-method-access.2.cs      \
-       dynamic-method-finalize.2.cs    \
-       dynamic-method-stack-traces.cs  \
-       generic_type_definition.2.cs    \
-       bug-333798-tb.2.cs      \
-       bug-335131.2.cs \
-       bug-322722_patch_bx.2.cs        \
-       bug-322722_dyn_method_throw.2.cs        \
-       bug-389886-2.cs \
-       bug-349190.2.cs \
-       bug-389886-sre-generic-interface-instances.cs   \
-       bug-462592.cs   \
-       bug-575941.cs   \
-       bug-389886-3.cs \
-       constant-division.cs    \
-       dynamic-method-resurrection.cs  \
-       bug-80307.cs    \
-       assembly_append_ordering.cs     \
-       bug-544446.cs   \
-       bug-36848.cs    \
-       generic-marshalbyref.2.cs       \
-       stackframes-async.2.cs  \
-       transparentproxy.cs     \
-       bug-48015.cs    \
-       delegate9.cs    \
-       marshal-valuetypes.cs   \
-       xdomain-threads.cs      \
-       monitor.cs      \
-       generic-xdomain.2.cs    \
-       threadpool-exceptions7.cs       \
-       cross-domain.cs \
-       generic-unloading.2.cs  \
-       namedmutex-destroy-race.cs      \
-       thread6.cs      \
-       appdomain-threadpool-unload.cs
-
 # Disabled until ?mcs is fixed
 #      bug-331958.cs
-# Note: only add tests that are compatible with mobile_static to this category
-BASE_TEST_CS_SRC_UNIVERSAL=            \
+BASE_TEST_CS_SRC=              \
        generic-unloading-sub.2.cs      \
        create-instance.cs      \
        bug-2907.cs             \
@@ -421,6 +367,7 @@ BASE_TEST_CS_SRC_UNIVERSAL=         \
        bug-81691.cs    \
        bug-415577.cs   \
        filter-stack.cs \
+       vararg.cs       \
        vararg2.cs      \
        bug-461867.cs   \
        bug-461941.cs   \
@@ -474,16 +421,68 @@ BASE_TEST_CS_SRC_UNIVERSAL=               \
        thread-native-exit.cs \
        reference-loader.cs \
        thread-suspend-suspended.cs \
-       thread-suspend-selfsuspended.cs
-
-if INSTALL_MOBILE_STATIC
-BASE_TEST_CS_SRC= \
-       $(BASE_TEST_CS_SRC_UNIVERSAL)
-else
-BASE_TEST_CS_SRC= \
-       $(BASE_TEST_MOBILE_STATIC_NOT_SUPPORTED) \
-       $(BASE_TEST_CS_SRC_UNIVERSAL)
-endif
+       thread-suspend-selfsuspended.cs \
+       remoting4.cs    \
+       remoting1.cs    \
+       remoting2.cs    \
+       remoting3.cs    \
+       remoting5.cs    \
+       appdomain.cs    \
+       appdomain-client.cs     \
+       appdomain-unload.cs     \
+       appdomain-async-invoke.cs       \
+       appdomain-thread-abort.cs       \
+       appdomain1.cs   \
+       appdomain2.cs   \
+       appdomain-exit.cs       \
+       assemblyresolve_event2.2.cs     \
+       appdomain-unload-callback.cs    \
+       appdomain-unload-doesnot-raise-pending-events.cs        \
+       unload-appdomain-on-shutdown.cs \
+       bug-47295.cs    \
+       loader.cs       \
+       pinvoke2.cs     \
+       generic-type-builder.2.cs       \
+       dynamic-generic-size.cs \
+       cominterop.cs   \
+       dynamic-method-access.2.cs      \
+       dynamic-method-finalize.2.cs    \
+       dynamic-method-stack-traces.cs  \
+       generic_type_definition.2.cs    \
+       bug-333798-tb.2.cs      \
+       bug-335131.2.cs \
+       bug-322722_patch_bx.2.cs        \
+       bug-322722_dyn_method_throw.2.cs        \
+       bug-389886-2.cs \
+       bug-349190.2.cs \
+       bug-389886-sre-generic-interface-instances.cs   \
+       bug-462592.cs   \
+       bug-575941.cs   \
+       bug-389886-3.cs \
+       constant-division.cs    \
+       dynamic-method-resurrection.cs  \
+       bug-80307.cs    \
+       assembly_append_ordering.cs     \
+       bug-544446.cs   \
+       bug-36848.cs    \
+       generic-marshalbyref.2.cs       \
+       stackframes-async.2.cs  \
+       transparentproxy.cs     \
+       bug-48015.cs    \
+       delegate9.cs    \
+       marshal-valuetypes.cs   \
+       xdomain-threads.cs      \
+       monitor.cs      \
+       generic-xdomain.2.cs    \
+       threadpool-exceptions7.cs       \
+       cross-domain.cs \
+       generic-unloading.2.cs  \
+       namedmutex-destroy-race.cs      \
+       thread6.cs      \
+       appdomain-threadpool-unload.cs  \
+       process-unref-race.cs   \
+       bug-46661.cs    \
+       w32message.cs
 
 TEST_CS_SRC_DIST=      \
        $(BASE_TEST_CS_SRC)     \
@@ -498,8 +497,6 @@ TEST_CS_SRC_GEN = \
 
 if AMD64
 TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs finally_guard.cs finally_block_ending_in_dead_bb.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 finally_guard.cs finally_block_ending_in_dead_bb.cs
@@ -510,6 +507,88 @@ endif
 
 if IA64
 TEST_CS_SRC+=async-exc-compilation.cs filter-stack.cs
+endif
+
+TEST_IL_SRC=                   \
+       field-access.il         \
+       method-access.il        \
+       ldftn-access.il         \
+       cpblkTest.il            \
+       vbinterface.il          \
+       calliTest.il            \
+       calliGenericTest.il             \
+       ckfiniteTest.il         \
+       fault-handler.il                \
+       locallocTest.il         \
+       initblkTest.il          \
+       qt-instance.il          \
+       vararg.il               \
+       bug-29859.il            \
+       bug-78549.il            \
+       static-fields-nonconst.il       \
+       reload-at-bb-end.il     \
+       test-enum-indstoreil.il \
+       filter-bug.il           \
+       even-odd.il             \
+       bug-82022.il    \
+       vt-sync-method.il       \
+       enum_types.il   \
+       invalid-token.il        \
+       call_missing_method.il  \
+       call_missing_class.il   \
+       ldfld_missing_field.il  \
+       ldfld_missing_class.il  \
+       find-method.2.il        \
+       bug-79215.2.il  \
+       bug-79956.2.il  \
+       bug-327438.2.il \
+       bug-387274.2.il \
+       bug-426309.2.il \
+       ldtoken_with_byref_typespec.2.il \
+       resolve_method_bug.2.il \
+       resolve_field_bug.2.il \
+       resolve_type_bug.2.il   \
+       generics-sharing-other-exc.2.il \
+       generic-ldobj.2.il      \
+       generic-mkrefany.2.il   \
+       generic-refanyval.2.il  \
+       generic-ldtoken.2.il    \
+       generic-ldtoken-method.2.il     \
+       generic-ldtoken-field.2.il      \
+       generic-tailcall.2.il   \
+       generic-tailcall2.2.il  \
+       generic-array-exc.2.il  \
+       generic-valuetype-newobj2.2.il  \
+       generic-valuetype-newobj.2.il   \
+       generic-constrained.2.il        \
+       generic-type-load-exception.2.il        \
+       bug-81466.il    \
+       bug457574.il    \
+       bug445361.il    \
+       bug-463303.il   \
+       bug469742.2.il  \
+       bug-528055.il   \
+       array_load_exception.il \
+       bug-481403.il   \
+       interface-with-static-method.il \
+       bug-633291.il   \
+       delegate-with-null-target.il    \
+       bug-318677.il   \
+       gsharing-valuetype-layout.il    \
+       invalid_generic_instantiation.il \
+       bug-45841-fpstack-exceptions.il
+
+if AMD64
+# #651684
+PLATFORM_DISABLED_TESTS = finally_guard.exe
+
+if HOST_WIN32
+PLATFORM_DISABLED_TESTS += w32message.exe
+endif
+
+endif
+
+if IA64
 # bug #319249
 PLATFORM_DISABLED_TESTS=exception17.exe
 PLATFORM_DISABLED_TESTS+=winx64structs.exe
@@ -519,7 +598,7 @@ if X86
 
 if HOST_WIN32
 PLATFORM_DISABLED_TESTS=async-exc-compilation.exe finally_guard.exe finally_block_ending_in_dead_bb.exe \
-       bug-18026.exe monitor.exe threadpool-exceptions5.exe
+       bug-18026.exe monitor.exe threadpool-exceptions5.exe process-unref-race.exe w32message.exe
 endif
 
 endif
@@ -570,6 +649,8 @@ PLATFORM_DISABLED_TESTS= abort-stress-1.exe \
                          threadpool-exceptions5.exe \
                          threadpool-exceptions6.exe
 
+PLATFORM_DISABLED_TESTS+= w32message.exe
+
 # Tests that rely on AppDomain.Unload
 PLATFORM_DISABLED_TESTS+= appdomain-async-invoke.exe \
                           appdomain-exit.exe \
@@ -642,10 +723,12 @@ else
 COOP_DISABLED_TESTS= 
 endif
 
-if INSTALL_MOBILE_STATIC
+PROFILE_DISABLED_TESTS=
+
+if FULL_AOT_TESTS
 # Tests which rely on TypeLoadExceptions
 # In full-aot mode, these cause the relevant methods to be not AOTed.
-PROFILE_DISABLED_TESTS = \
+PROFILE_DISABLED_TESTS += \
        typeload-unaligned.exe \
        field-access.exe \
        invalid_generic_instantiation.exe \
@@ -681,13 +764,129 @@ PROFILE_DISABLED_TESTS += \
        thunks.exe
 
 # Tests which load assemblies which are not
-# in the mobile_static profile
+# in the testing_aot_full profile
 PROFILE_DISABLED_TESTS += \
        assembly-load-remap.exe
-else
-PROFILE_DISABLED_TESTS=
+
+# Test which needs remoting support
+PROFILE_DISABLED_TESTS += \
+       remoting4.exe   \
+       remoting1.exe   \
+       remoting2.exe   \
+       remoting3.exe   \
+       remoting5.exe
+
+# Tests which needs AppDomain support
+PROFILE_DISABLED_TESTS += \
+       appdomain.exe   \
+       appdomain-client.exe    \
+       appdomain-unload.exe    \
+       appdomain-async-invoke.exe      \
+       appdomain-thread-abort.exe      \
+       appdomain1.exe  \
+       appdomain2.exe  \
+       appdomain-exit.exe      \
+       appdomain-unload-callback.exe   \
+       appdomain-unload-doesnot-raise-pending-events.exe       \
+       unload-appdomain-on-shutdown.exe        \
+       assemblyresolve_event2.2.exe    \
+       bug-544446.exe  \
+       bug-36848.exe   \
+       generic-marshalbyref.2.exe      \
+       stackframes-async.2.exe \
+       transparentproxy.exe    \
+       bug-48015.exe   \
+       delegate9.exe   \
+       marshal-valuetypes.exe  \
+       xdomain-threads.exe     \
+       monitor.exe     \
+       generic-xdomain.2.exe   \
+       threadpool-exceptions7.exe      \
+       cross-domain.exe        \
+       generic-unloading.2.exe \
+       appdomain-threadpool-unload.exe
+
+# Tests which needs System.Reflection.Emit support
+PROFILE_DISABLED_TESTS += \
+       bug-47295.exe   \
+       loader.exe      \
+       pinvoke2.exe    \
+       generic-type-builder.2.exe      \
+       dynamic-generic-size.exe        \
+       cominterop.exe  \
+       dynamic-method-access.2.exe     \
+       dynamic-method-finalize.2.exe   \
+       dynamic-method-stack-traces.exe \
+       generic_type_definition.2.exe   \
+       bug-333798-tb.2.exe     \
+       bug-335131.2.exe        \
+       bug-322722_patch_bx.2.exe       \
+       bug-322722_dyn_method_throw.2.exe       \
+       bug-389886-2.exe        \
+       bug-349190.2.exe        \
+       bug-389886-sre-generic-interface-instances.exe  \
+       bug-462592.exe  \
+       bug-575941.exe  \
+       bug-389886-3.exe        \
+       constant-division.exe   \
+       dynamic-method-resurrection.exe \
+       assembly_append_ordering.exe
+
+# Test which needs System.Web support
+PROFILE_DISABLED_TESTS += \
+       bug-80307.exe
+
+# Tests which needs named Mutex support
+PROFILE_DISABLED_TESTS += \
+       namedmutex-destroy-race.exe
+
+# ThreadAbortException doesn't have necessary field for this test
+PROFILE_DISABLED_TESTS += \
+       thread6.exe
+
+# can't AOT the TestingReferenceAssembly.dll which is a dependency
+# of reference-loader.exe because it contains the [ReferenceAssemblyAttribute]
+# and the runtime errors out with "File does not contain a valid CIL image."
+PROFILE_DISABLED_TESTS += \
+       reference-loader.exe
+
+# constraints-load.il: 
+# Failed to load method 0x6000007 from '..../mono/tests/constraints-load.exe' due to 
+# Could not resolve type with token 01000002 assembly:mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.BrokenIComparable`1 member:<none>.
+PROFILE_DISABLED_TESTS += \
+       constraints-load.exe \
+       bug-515884.exe
+endif
+
+if HYBRID_AOT_TESTS
+PROFILE_DISABLED_TESTS += \
+       bug-80307.exe \
+       namedmutex-destroy-race.exe
 endif
 
+AOT_DISABLED_TESTS= \
+       constraints-load.exe
+
+CI_DISABLED_TESTS = \
+       main-returns-background-resetabort.exe \
+       main-returns-background-abort-resetabort.exe    \
+       assemblyresolve_event3.exe \
+       delegate2.exe   \
+       finally_guard.exe \
+       generic-xdomain.2.exe
+
+# failing tests which we temporarily disable for PRs
+# so they don't interfere with other people's work
+CI_PR_DISABLED_TESTS = \
+       appdomain-threadpool-unload.exe \
+       appdomain-thread-abort.exe
+
+# appdomain-threadpool-unload.exe creates 100 appdomains, takes too long with llvm
+LLVM_DISABLED_TESTS = \
+       appdomain-threadpool-unload.exe
+
+LLVM = $(filter --llvm, $(MONO_ENV_OPTIONS))
+
 # 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
@@ -696,143 +895,169 @@ endif
 # bug-Xamarin-5278.exe got broken by 5d26590e79da139a284459299aee95c25f4cd835
 # bug-45841-fpstack-exceptions.exe: https://bugzilla.xamarin.com/show_bug.cgi?id=47053
 # appdomain-thread-abort.exe: https://bugzilla.xamarin.com/show_bug.cgi?id=47054
-DISABLED_TESTS=                        \
+KNOWN_FAILING_TESTS = \
        delegate-async-exception.exe    \
        bug-348522.2.exe        \
        bug-459094.exe \
        delegate-invoke.exe \
        bug-Xamarin-5278.exe \
        bug-45841-fpstack-exceptions.exe \
-       appdomain-thread-abort.exe \
+       appdomain-thread-abort.exe
+
+DISABLED_TESTS = \
+       $(KNOWN_FAILING_TESTS) \
        $(PLATFORM_DISABLED_TESTS) \
        $(EXTRA_DISABLED_TESTS) \
        $(COOP_DISABLED_TESTS) \
-       $(PROFILE_DISABLED_TESTS)
-
-# failing tests which we temporarily disable for PRs
-# so they don't interfere with other people's work
-DISABLED_TESTS_CI_PR = \
-       appdomain-threadpool-unload.exe \
-       appdomain-thread-abort.exe
-
-DISABLED_TESTS_CI=     \
-       $(DISABLED_TESTS)       \
-       $(shell if [ "x$(CI_PR)" != "x" ]; then echo $(DISABLED_TESTS_CI_PR); fi)       \
-       main-returns-background-resetabort.exe \
-       main-returns-background-abort-resetabort.exe    \
-       thread6.exe     \
-       assemblyresolve_event3.exe \
-       delegate2.exe   \
-       finally_guard.exe \
-       gc-altstack.exe \
-       generic-xdomain.2.exe
-
-AOT_DISABLED_TESTS=constraints-load.exe
-
-# These only compile with MS CSC
-TEST_CSC_SRC=                  \
-       vararg.cs
-
-# constraints-load.il: 
-# Failed to load method 0x6000007 from '..../mono/tests/constraints-load.exe' due to 
-# Could not resolve type with token 01000002 assembly:mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.BrokenIComparable`1 member:<none>.
-IL_SRC_MOBILE_STATIC_NOT_SUPPORTED=    \
-       constraints-load.il \
-       bug-515884.il
-
-TEST_IL_SRC_UNIVERSAL=                 \
-       field-access.il         \
-       method-access.il        \
-       ldftn-access.il         \
-       cpblkTest.il            \
-       vbinterface.il          \
-       calliTest.il            \
-       calliGenericTest.il             \
-       ckfiniteTest.il         \
-       fault-handler.il                \
-       locallocTest.il         \
-       initblkTest.il          \
-       qt-instance.il          \
-       vararg.il               \
-       bug-29859.il            \
-       bug-78549.il            \
-       static-fields-nonconst.il       \
-       reload-at-bb-end.il     \
-       test-enum-indstoreil.il \
-       filter-bug.il           \
-       even-odd.il             \
-       bug-82022.il    \
-       vt-sync-method.il       \
-       enum_types.il   \
-       invalid-token.il        \
-       call_missing_method.il  \
-       call_missing_class.il   \
-       ldfld_missing_field.il  \
-       ldfld_missing_class.il  \
-       find-method.2.il        \
-       bug-79215.2.il  \
-       bug-79956.2.il  \
-       bug-327438.2.il \
-       bug-387274.2.il \
-       bug-426309.2.il \
-       ldtoken_with_byref_typespec.2.il \
-       resolve_method_bug.2.il \
-       resolve_field_bug.2.il \
-       resolve_type_bug.2.il   \
-       generics-sharing-other-exc.2.il \
-       generic-ldobj.2.il      \
-       generic-mkrefany.2.il   \
-       generic-refanyval.2.il  \
-       generic-ldtoken.2.il    \
-       generic-ldtoken-method.2.il     \
-       generic-ldtoken-field.2.il      \
-       generic-tailcall.2.il   \
-       generic-tailcall2.2.il  \
-       generic-array-exc.2.il  \
-       generic-valuetype-newobj2.2.il  \
-       generic-valuetype-newobj.2.il   \
-       generic-constrained.2.il        \
-       generic-type-load-exception.2.il        \
-       bug-81466.il    \
-       bug457574.il    \
-       bug445361.il    \
-       bug-463303.il   \
-       bug469742.2.il  \
-       bug-528055.il   \
-       array_load_exception.il \
-       bug-481403.il   \
-       interface-with-static-method.il \
-       bug-633291.il   \
-       delegate-with-null-target.il    \
-       bug-318677.il   \
-       gsharing-valuetype-layout.il    \
-       invalid_generic_instantiation.il \
-       bug-45841-fpstack-exceptions.il
-
-if INSTALL_MOBILE_STATIC
-TEST_IL_SRC= \
-       $(TEST_IL_SRC_UNIVERSAL)
-else
-TEST_IL_SRC= \
-       $(TEST_IL_SRC_MOBILE_STATIC_NOT_SUPPORTED) \
-       $(TEST_IL_SRC_UNIVERSAL)
-endif
+       $(PROFILE_DISABLED_TESTS) \
+       $(if $(AOT),$(AOT_DISABLED_TESTS)) \
+       $(if $(CI),$(CI_DISABLED_TESTS)) \
+       $(if $(CI_PR),$CI_PR_DISABLED_TESTS) \
+       $(if $(LLVM),$(LLVM_DISABLED_TESTS))
+
+INTERP_DISABLED_TESTS = \
+       $(CI_PR_DISABLED_TESTS) \
+       $(CI_DISABLED_TESTS) \
+       $(KNOWN_FAILING_TESTS) \
+       abort-cctor.exe \
+       appdomain-async-invoke.exe \
+       appdomain-exit.exe \
+       appdomain-unload-callback.exe \
+       appdomain-unload-doesnot-raise-pending-events.exe \
+       appdomain-unload.exe \
+       appdomain.exe \
+       appdomain1.exe \
+       appdomain2.exe \
+       array_load_exception.exe \
+       assembly_append_ordering.exe \
+       assemblyresolve_event4.exe \
+       async-exc-compilation.exe \
+       async-with-cb-throws.exe \
+       async_read.exe \
+       bug-18026.exe \
+       bug-2907.exe \
+       bug-323114.exe \
+       bug-327438.2.exe \
+       bug-335131.2.exe \
+       bug-415577.exe \
+       bug-461867.exe \
+       bug-461941.exe \
+       bug-46661.exe \
+       bug-47295.exe \
+       bug-48015.exe \
+       bug-544446.exe \
+       bug-685908.exe \
+       bug-80307.exe \
+       bug-80392.2.exe \
+       bug-81673.exe \
+       bug-82022.exe \
+       bug445361.exe \
+       call_missing_class.exe \
+       call_missing_method.exe \
+       calliGenericTest.exe \
+       cominterop.exe \
+       constant-division.exe \
+       context-static.exe \
+       cross-domain.exe \
+       delegate-async-exit.exe \
+       delegate-delegate-exit.exe \
+       delegate-exit.exe \
+       delegate-with-null-target.exe \
+       delegate1.exe \
+       delegate3.exe \
+       delegate5.exe \
+       delegate8.exe \
+       delegate9.exe \
+       dynamic-method-access.2.exe \
+       dynamic-method-finalize.2.exe \
+       dynamic-method-resurrection.exe \
+       dynamic-method-stack-traces.exe \
+       even-odd.exe \
+       exception18.exe \
+       field-access.exe \
+       finally_block_ending_in_dead_bb.exe \
+       generic-marshalbyref.2.exe \
+       generic-mkrefany.2.exe \
+       generic-refanyval.2.exe \
+       generic-stack-traces2.2.exe \
+       generic-type-load-exception.2.exe \
+       generic-unloading.2.exe \
+       generics-invoke-byref.2.exe \
+       generics-sharing.2.exe \
+       handleref.exe \
+       invalid-token.exe \
+       invalid_generic_instantiation.exe \
+       ldfld_missing_class.exe \
+       ldfld_missing_field.exe \
+       ldftn-access.exe \
+       main-returns-background-change.exe \
+       marshal-valuetypes.exe \
+       marshal.exe \
+       marshal2.exe \
+       marshal8.exe \
+       marshal9.exe \
+       marshalbool.exe \
+       method-access.exe \
+       monitor.exe \
+       nullable_boxing.2.exe \
+       pinvoke-2.2.exe \
+       pinvoke-utf8.exe \
+       pinvoke.exe \
+       pinvoke11.exe \
+       pinvoke2.exe \
+       pinvoke3.exe \
+       pinvoke_ppcc.exe \
+       pinvoke_ppcd.exe \
+       pinvoke_ppcf.exe \
+       pinvoke_ppci.exe \
+       pinvoke_ppcs.exe \
+       process-unref-race.exe \
+       reload-at-bb-end.exe \
+       remoting1.exe \
+       remoting2.exe \
+       remoting3.exe \
+       remoting4.exe \
+       remoting5.exe \
+       safehandle.2.exe \
+       stackframes-async.2.exe \
+       static-constructor.exe \
+       test-inline-call-stack.exe \
+       test-type-ctor.exe \
+       thread6.exe \
+       threadpool-exceptions1.exe \
+       threadpool-exceptions2.exe \
+       threadpool-exceptions3.exe \
+       threadpool-exceptions4.exe \
+       threadpool-exceptions5.exe \
+       threadpool-exceptions6.exe \
+       threadpool-exceptions7.exe \
+       threadpool.exe \
+       threadpool1.exe \
+       thunks.exe \
+       transparentproxy.exe \
+       typeload-unaligned.exe \
+       unload-appdomain-on-shutdown.exe \
+       vararg.exe \
+       vararg2.exe \
+       vt-sync-method.exe \
+       winx64structs.exe \
+       xdomain-threads.exe
 
 # pre-requisite test sources: files that are not test themselves
 # but that need to be compiled
 PREREQ_IL_SRC=event-il.il module-cctor.il
 PREREQ_CS_SRC=
 PREREQ_IL_DLL_SRC=
-PREREQ_CS_DLL_SRC=TestingReferenceAssembly.cs TestingReferenceReferenceAssembly.cs
+PREREQ_CS_DLL_SRC=
 
 PREREQSI_IL=$(PREREQ_IL_SRC:.il=.exe) \
        $(PREREQ_IL_DLL_SRC:.il=.dll)
 PREREQSI_CS=$(PREREQ_CS_SRC:.cs=.exe) \
        $(PREREQ_CS_DLL_SRC:.cs=.dll)
-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)
+TESTSI_CS=$(filter-out $(DISABLED_TESTS),$(TEST_CS_SRC:.cs=.exe))
+TESTSI_IL=$(filter-out $(DISABLED_TESTS),$(TEST_IL_SRC:.il=.exe))
+TESTBS=$(filter-out $(DISABLED_TESTS),$(BENCHSRC:.cs=.exe))
+STRESS_TESTS=$(filter-out $(DISABLED_TESTS),$(STRESS_TESTS_SRC:.cs=.exe))
 
 PREREQSI_IL_AOT=$(PREREQ_IL_SRC:.il=.exe$(PLATFORM_AOT_SUFFIX)) \
                $(PREREQ_IL_DLL_SRC:.il=.dll$(PLATFORM_AOT_SUFFIX))
@@ -845,21 +1070,35 @@ EXTRA_DIST=test-driver test-runner.cs $(TEST_CS_SRC_DIST) $(TEST_IL_SRC) \
 %.exe: %.il
        $(ILASM) -out:$@ $<
 
-if !INSTALL_MOBILE_STATIC
-TEST_DRIVER_HARD_KILL_FEATURE=-r:Mono.Posix.dll
+if !FULL_AOT_TESTS
+TEST_DRIVER_HARD_KILL_FEATURE=-r:$(CLASS)/Mono.Posix.dll
 endif
 
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+TEST_DRIVER_DEPEND=TestDriver.dll$(PLATFORM_AOT_SUFFIX)
+else
+if HYBRID_AOT_TESTS
 TEST_DRIVER_DEPEND=TestDriver.dll$(PLATFORM_AOT_SUFFIX)
 else
 TEST_DRIVER_DEPEND=TestDriver.dll
 endif
+endif
 
 %.exe: %.cs $(TEST_DRIVER_DEPEND)
+       $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -r:TestDriver.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $<
+
+# N.B. test-runner.exe references the TOOLS_RUNTIME versions of the framework assemblies
+test-runner.exe: test-runner.cs $(TEST_DRIVER_DEPEND)
        $(MCS) -r:System.dll -r:System.Xml.dll -r:System.Core.dll -r:TestDriver.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $<
 
 %.dll: %.cs
-       $(MCS) -r:System.dll -target:library -out:$@ $<
+       $(MCS) -r:$(CLASS)/System.dll -target:library -out:$@ $<
+
+reference-loader.exe: reference-loader.cs TestingReferenceAssembly.dll TestingReferenceReferenceAssembly.dll $(TEST_DRIVER_DEPEND)
+       $(MCS) -r:$(CLASS)/System.dll -r:TestDriver.dll -r:TestingReferenceAssembly.dll -r:TestingReferenceReferenceAssembly.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $(srcdir)/reference-loader.cs
+
+TestingReferenceAssembly.dll: TestingReferenceAssembly.cs
+       $(MCS) -target:library -out:$@ $<
 
 TestingReferenceReferenceAssembly.dll: TestingReferenceReferenceAssembly.cs TestingReferenceAssembly.dll
        $(MCS) -r:TestingReferenceAssembly.dll -target:library -out:$@ $<
@@ -898,15 +1137,17 @@ bug-324535-il.dll$(PLATFORM_AOT_SUFFIX)  \
 bug-36848-a.dll$(PLATFORM_AOT_SUFFIX)  \
 bug-81691-b.dll$(PLATFORM_AOT_SUFFIX)  \
 bug-327438.2.exe$(PLATFORM_AOT_SUFFIX) \
-bug-81466-lib.dll$(PLATFORM_AOT_SUFFIX)        \
-TestingReferenceAssembly.dll$(PLATFORM_AOT_SUFFIX)     \
-TestingReferenceReferenceAssembly.dll$(PLATFORM_AOT_SUFFIX)
+bug-81466-lib.dll$(PLATFORM_AOT_SUFFIX)
 
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+prereqs: $(PREREQSI_IL_AOT) $(PREREQSI_CS_AOT) $(AOT_EXTRA_LIBS)
+else
+if HYBRID_AOT_TESTS
 prereqs: $(PREREQSI_IL_AOT) $(PREREQSI_CS_AOT) $(AOT_EXTRA_LIBS)
 else
 prereqs: $(PREREQSI_IL) $(PREREQSI_CS)
 endif
+endif
 
 # Target to precompile the test executables
 tests: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la prereqs $(GSHARED_TESTS)
@@ -923,22 +1164,6 @@ test-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
 endif
 
-#
-# Tests that the internals in mono/io-layer/messages.c are ok by triggering the 
-# code that checks that the table is properly sorted
-#
-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 2>&1 && cmp test_messages.zero w32message.allout
-endif
-endif
-
 test-env-options:
        MONO_ENV_OPTIONS="--version" $(RUNTIME) array-init.exe | grep -q Architecture:
 
@@ -946,8 +1171,11 @@ test-sgen : sgen-tests
 
 # Precompile the test assemblies in parallel
 compile-tests:
-       $(MAKE) -j4 $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
-if INSTALL_MOBILE_STATIC
+       $(MAKE) -j4 $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS) compile-gac-loading
+if FULL_AOT_TESTS
+       $(MAKE) $(PREREQSI_IL_AOT) $(PREREQSI_CS_AOT) $(AOT_EXTRA_LIBS)
+endif
+if HYBRID_AOT_TESTS
        $(MAKE) $(PREREQSI_IL_AOT) $(PREREQSI_CS_AOT) $(AOT_EXTRA_LIBS)
 endif
 
@@ -962,57 +1190,17 @@ assemblyresolve/test/asm.dll:
 TestDriver.dll:
        $(MCS) -target:library -out:$@ $(srcdir)/../mini/TestDriver.cs $(srcdir)/../mini/TestHelpers.cs
 
-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_CI)"; 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}" "$${dump_action}" $(RUNTIME_ARGS); \
-               then \
-                       passed=`expr $${passed} + 1`; \
-               else \
-                       if [ $$? = 2 ]; then break; fi; \
-                       failed=`expr $${failed} + 1`; \
-               fi \
-       done; \
-       echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) did not pass."; echo
-
-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_CI)"; 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}" "$${dump_action}" $(RUNTIME_ARGS); \
-               then \
-                       passed=`expr $${passed} + 1`; \
-               else \
-                       if [ $$? = 2 ]; then break; fi; \
-                       failed=`expr $${failed} + 1`; \
-               fi \
-       done; \
-       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_CI)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
-       for i in $(TESTBS); do  \
-               $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS);  \
-       done
-
 runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
        @failed=0; \
        passed=0; \
        failed_tests="";\
        if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
-       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_CI)"; 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}" "$${dump_action}" $(RUNTIME_ARGS); \
+               $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $${i} > $${i}.aotlog 2>&1 || exit 1; \
+               if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" "$${dump_action}" $(RUNTIME_ARGS); \
                then \
                        passed=`expr $${passed} + 1`; \
                else \
@@ -1036,12 +1224,10 @@ runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQS
        fi
 
 runtest-managed: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
-       @if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_CI)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
-       $(RUNTIME) --debug $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name "runtime" --timeout 300 --disabled "$${disabled_tests}" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
+       $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name "runtime" --timeout 300 --disabled "$(DISABLED_TESTS)" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
 
 runtest-managed-serial: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
-       @if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_CI)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
-       $(RUNTIME) --debug $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j 1 --testsuite-name "runtime" --disabled "$${disabled_tests}" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
+       $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j 1 --testsuite-name "runtime" --disabled "$(DISABLED_TESTS)" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
 
 testjit:
        @if test x$(M) != x0; then $(MAKE) runtest-managed; else $(MAKE) runtest; fi
@@ -1052,8 +1238,8 @@ testaot:
 testtrace:
        @$(MAKE) RUNTIME_ARGS="$${RUNTIME_ARGS} --trace" runtest
 
-testinterp:
-       @$(MAKE) JITTEST_PROG_RUN="$(TEST_PROG_RUN)" runtest
+testinterp: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
+       $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --runtime-args "--interpreter" --testsuite-name "runtime-interp" --timeout 300 --disabled "$(INTERP_DISABLED_TESTS)" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
 
 testjitspeed: $(JITTEST_PROG) $(TESTBS)
        for i in $(TESTBS); do  \
@@ -1144,36 +1330,36 @@ if !S390X
        $(MAKE) sgen-bridge2-tests
 endif
 
-SGEN_REGULAR_TESTS_MOBILE_STATIC_NOT_SUPPORTED =       \
+SGEN_REGULAR_TESTS_SRC =       \
+       finalizer-wait.cs       \
+       critical-finalizers.cs  \
+       sgen-descriptors.cs     \
+       sgen-gshared-vtype.cs   \
+       sgen-weakref-stress.cs  \
+       sgen-cementing-stress.cs        \
+       sgen-case-23400.cs      \
+       sgen-new-threads-dont-join-stw.cs       \
+       sgen-new-threads-dont-join-stw-2.cs     \
+       sgen-new-threads-collect.cs     \
+       gc-graystack-stress.cs  \
+       bug-17590.cs    \
+       sgen-domain-unload.cs   \
+       sgen-domain-unload-2.cs
+
+SGEN_REGULAR_DISABLED_TESTS=
+
+if FULL_AOT_TESTS
+SGEN_REGULAR_DISABLED_TESTS += \
        sgen-domain-unload.exe  \
        sgen-domain-unload-2.exe
-
-SGEN_REGULAR_TESTS_UNIVERSAL = \
-       finalizer-wait.exe      \
-       critical-finalizers.exe \
-       sgen-descriptors.exe    \
-       sgen-gshared-vtype.exe  \
-       sgen-weakref-stress.exe \
-       sgen-cementing-stress.exe       \
-       sgen-case-23400.exe     \
-       sgen-new-threads-dont-join-stw.exe      \
-       sgen-new-threads-dont-join-stw-2.exe    \
-       sgen-new-threads-collect.exe    \
-       gc-graystack-stress.exe \
-       bug-17590.exe
-
-if INSTALL_MOBILE_STATIC
-SGEN_REGULAR_TESTS= \
-       $(SGEN_REGULAR_TESTS_UNIVERSAL)
-else
-SGEN_REGULAR_TESTS= \
-       $(SGEN_REGULAR_TESTS_MOBILE_STATIC_NOT_SUPPORTED) \
-       $(SGEN_REGULAR_TESTS_UNIVERSAL)
 endif
 
+SGEN_REGULAR_TESTS=$(filter-out $(SGEN_REGULAR_DISABLED_TESTS),$(SGEN_REGULAR_TESTS_SRC:.cs=.exe))
+
 sgen-regular-tests: $(SGEN_REGULAR_TESTS)
        $(MAKE) sgen-regular-tests-ms
        $(MAKE) sgen-regular-tests-ms-conc
+       $(MAKE) sgen-regular-tests-ms-conc-par
        $(MAKE) sgen-regular-tests-ms-conc-split
        $(MAKE) sgen-regular-tests-ms-split
        $(MAKE) sgen-regular-tests-ms-conc-split-95
@@ -1182,142 +1368,156 @@ sgen-regular-tests: $(SGEN_REGULAR_TESTS)
        $(MAKE) sgen-regular-tests-ms-conc-split-clear-at-gc
 
 sgen-regular-tests-ms: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-params=major=marksweep" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-conc: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-params=major=marksweep-conc" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
+sgen-regular-tests-ms-conc-par: $(SGEN_REGULAR_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-params=major=marksweep-conc-par"  --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-conc-split: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep-conc,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-params=major=marksweep-conc,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-split: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-params=major=marksweep,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-conc-split-95: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep-conc,minor=split,alloc-ratio=95" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-params=major=marksweep-conc,minor=split,alloc-ratio=95" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-clear-at-gc: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="major=marksweep" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=major=marksweep" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-conc-clear-at-gc: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=major=marksweep-conc" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-conc-split-clear-at-gc: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="major=marksweep-conc,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=major=marksweep-conc,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 
 SGEN_TOGGLEREF_TESTS=  \
        sgen-toggleref.exe
 
 sgen-toggleref-tests: $(SGEN_TOGGLEREF_TESTS)
-       $(MAKE) sgen-toggleref-tests-plain
+       $(MAKE) sgen-toggleref-tests-ms
        $(MAKE) sgen-toggleref-tests-ms-conc
        $(MAKE) sgen-toggleref-tests-ms-conc-split
        $(MAKE) sgen-toggleref-tests-ms-split
        $(MAKE) sgen-toggleref-tests-ms-split-95
-       $(MAKE) sgen-toggleref-tests-plain-clear-at-gc
+       $(MAKE) sgen-toggleref-tests-ms-clear-at-gc
        $(MAKE) sgen-toggleref-tests-ms-conc-clear-at-gc
        $(MAKE) sgen-toggleref-tests-ms-split-clear-at-gc
 
-sgen-toggleref-tests-plain: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+sgen-toggleref-tests-ms: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-params=toggleref-test,major=marksweep" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-conc: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,major=marksweep-conc" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-params=toggleref-test,major=marksweep-conc" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-conc-split: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,major=marksweep-conc,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-params=toggleref-test,major=marksweep-conc,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-split: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-params=toggleref-test,major=marksweep,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-split-95: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,minor=split,alloc-ratio=95" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
-sgen-toggleref-tests-plain-clear-at-gc: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="toggleref-test" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-params=toggleref-test,major=marksweep,minor=split,alloc-ratio=95" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+sgen-toggleref-tests-ms-clear-at-gc: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=toggleref-test,major=marksweep" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-conc-clear-at-gc: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="toggleref-test,major=marksweep-conc" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=toggleref-test,major=marksweep-conc" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-split-clear-at-gc: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="toggleref-test,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=toggleref-test,major=marksweep,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 
 SGEN_BRIDGE_TESTS=     \
        sgen-bridge.exe \
        sgen-bridge-major-fragmentation.exe
 
 sgen-bridge-tests: $(SGEN_BRIDGE_TESTS)
-       $(MAKE) sgen-bridge-tests-plain
+       $(MAKE) sgen-bridge-tests-ms
        $(MAKE) sgen-bridge-tests-ms-conc
        $(MAKE) sgen-bridge-tests-ms-split
-       $(MAKE) sgen-bridge-tests-plain-new-bridge
+       $(MAKE) sgen-bridge-tests-ms-new-bridge
        $(MAKE) sgen-bridge-tests-ms-conc-new-bridge
        $(MAKE) sgen-bridge-tests-ms-split-new-bridge
-       $(MAKE) sgen-bridge-tests-plain-tarjan-bridge
+       $(MAKE) sgen-bridge-tests-ms-tarjan-bridge
        $(MAKE) sgen-bridge-tests-ms-split-tarjan-bridge
 
-sgen-bridge-tests-plain: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
+sgen-bridge-tests-ms: $(SGEN_BRIDGE_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-ms-conc: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-ms-split: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
-sgen-bridge-tests-plain-new-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=new" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
+sgen-bridge-tests-ms-new-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-ms-conc-new-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=new,major=marksweep-conc" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-ms-split-new-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=new,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
-sgen-bridge-tests-plain-tarjan-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep,minor=split,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
+sgen-bridge-tests-ms-tarjan-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-ms-split-tarjan-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep,minor=split,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
 
 SGEN_BRIDGE2_TESTS=    \
        sgen-bridge-xref.exe
 
 sgen-bridge2-tests: $(SGEN_BRIDGE2_TESTS)
-       $(MAKE) sgen-bridge2-tests-plain
+       $(MAKE) sgen-bridge2-tests-ms
        $(MAKE) sgen-bridge2-tests-ms-conc
        $(MAKE) sgen-bridge2-tests-ms-split
-       $(MAKE) sgen-bridge2-tests-plain-new-bridge
+       $(MAKE) sgen-bridge2-tests-ms-new-bridge
        $(MAKE) sgen-bridge2-tests-ms-conc-new-bridge
        $(MAKE) sgen-bridge2-tests-ms-split-new-bridge
-       $(MAKE) sgen-bridge2-tests-plain-tarjan-bridge
+       $(MAKE) sgen-bridge2-tests-ms-tarjan-bridge
        $(MAKE) sgen-bridge2-tests-ms-split-tarjan-bridge
 
-sgen-bridge2-tests-plain: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
+sgen-bridge2-tests-ms: $(SGEN_BRIDGE2_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-ms-conc: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge  --gc-params=major=marksweep-conc" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-ms-split: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
-sgen-bridge2-tests-plain-new-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=new" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
+sgen-bridge2-tests-ms-new-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-ms-conc-new-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=new,major=marksweep-conc" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-ms-split-new-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=new,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
-sgen-bridge2-tests-plain-tarjan-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep,minor=split,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
+sgen-bridge2-tests-ms-tarjan-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-ms-split-tarjan-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep,minor=split,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
 
 SGEN_BRIDGE3_TESTS=    \
        sgen-bridge-gchandle.exe
 
 sgen-bridge3-tests: $(SGEN_BRIDGE3_TESTS)
-       $(MAKE) sgen-bridge3-tests-plain
+       $(MAKE) sgen-bridge3-tests-ms
        $(MAKE) sgen-bridge3-tests-ms-conc
        $(MAKE) sgen-bridge3-tests-ms-split
-       $(MAKE) sgen-bridge3-tests-plain-new-bridge
+       $(MAKE) sgen-bridge3-tests-ms-new-bridge
        $(MAKE) sgen-bridge3-tests-ms-conc-new-bridge
        $(MAKE) sgen-bridge3-tests-ms-split-new-bridge
-       $(MAKE) sgen-bridge3-tests-plain-tarjan-bridge
+       $(MAKE) sgen-bridge3-tests-ms-tarjan-bridge
        $(MAKE) sgen-bridge3-tests-ms-split-tarjan-bridge
 
-sgen-bridge3-tests-plain: $(SGEN_bridge3_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=3Bridge" MONO_GC_PARAMS="" $(RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE3_TESTS)
+sgen-bridge3-tests-ms: $(SGEN_bridge3_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep" --timeout 900 $(SGEN_BRIDGE3_TESTS)
 sgen-bridge3-tests-ms-conc: $(SGEN_BRIDGE3_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=3Bridge" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE3_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc" --timeout 900 $(SGEN_BRIDGE3_TESTS)
 sgen-bridge3-tests-ms-split: $(SGEN_BRIDGE3_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=3Bridge" MONO_GC_PARAMS="minor=split" $(RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE3_TESTS)
-sgen-bridge3-tests-plain-new-bridge: $(SGEN_BRIDGE3_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=3Bridge" MONO_GC_PARAMS="bridge-implementation=new" $(RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE3_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep,minor=split" --timeout 900 $(SGEN_BRIDGE3_TESTS)
+sgen-bridge3-tests-ms-new-bridge: $(SGEN_BRIDGE3_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep,bridge-implementation=new" --timeout 900 $(SGEN_BRIDGE3_TESTS)
 sgen-bridge3-tests-ms-conc-new-bridge: $(SGEN_BRIDGE3_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=3Bridge" MONO_GC_PARAMS="bridge-implementation=new,major=marksweep-conc" $(RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE3_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc,bridge-implementation=new" --timeout 900 $(SGEN_BRIDGE3_TESTS)
 sgen-bridge3-tests-ms-split-new-bridge: $(SGEN_BRIDGE3_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=3Bridge" MONO_GC_PARAMS="bridge-implementation=new,minor=split" $(RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE3_TESTS)
-sgen-bridge3-tests-plain-tarjan-bridge: $(SGEN_BRIDGE3_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=3Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan" $(RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE3_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep,minor=split,bridge-implementation=new" --timeout 900 $(SGEN_BRIDGE3_TESTS)
+sgen-bridge3-tests-ms-tarjan-bridge: $(SGEN_BRIDGE3_TESTS) test-runner.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep,bridge-implementation=tarjan" --timeout 900 $(SGEN_BRIDGE3_TESTS)
 sgen-bridge3-tests-ms-split-tarjan-bridge: $(SGEN_BRIDGE3_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=3Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan,minor=split" $(RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE3_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep,minor=split,bridge-implementation=tarjan" --timeout 900 $(SGEN_BRIDGE3_TESTS)
+
+SGEN_OOM_TESTS_SRC =   \
+       sgen-oom-cementing-stress.cs    \
+       sgen-oom-new-threads-dont-join-stw-2.cs \
+       sgen-oom-bridge-major-fragmentation.cs \
+       gc-oom-handling.exe     \
+       gc-oom-handling2.exe
+
+SGEN_OOM_TESTS=$(SGEN_OOM_TESTS_SRC:.cs=.exe)
+
+sgen-oom-tests: $(SGEN_OOM_TESTS) test-runner.exe sgen-cementing-stress.exe sgen-new-threads-dont-join-stw-2.exe sgen-bridge-major-fragmentation.exe
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=max-valloc-size=50M,bridge=Bridge" --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_OOM_TESTS)
 
 
 AOT_CONFIGURATIONS=    \
@@ -1334,7 +1534,7 @@ test-aot:
        passed=0; \
        failed_tests="";\
        profile=$(DEFAULT_PROFILE);     \
-       tmpfile=`mktemp -t mono_aot_output` || exit 1;  \
+       tmpfile=`mktemp -t mono_aot_outputXXXXXX` || 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`; \
@@ -1373,7 +1573,10 @@ imt_big_iface_test.exe: $(TEST_DRIVER_DEPEND) make-imt-test.exe
 EXTRA_DIST += test-inline-call-stack-library.cs test-inline-call-stack.cs
 test-inline-call-stack-library.dll: $(TEST_DRIVER_DEPEND) $(srcdir)/test-inline-call-stack-library.cs
        $(MCS) -t:library -out:test-inline-call-stack-library.dll $(srcdir)/test-inline-call-stack-library.cs
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
@@ -1412,7 +1615,7 @@ test-unhandled-exception: unhandled-exception-test-runner.2.exe unhandled-except
 
 # We use 'test-support-files' to handle an ordering issue between the 'mono/' and 'runtime/' directories
 bug-80307.exe: $(srcdir)/bug-80307.cs
-       $(MCS) -r:System.Web.dll -out:$@ $(srcdir)/bug-80307.cs
+       $(MCS) -r:$(CLASS)/System.Web.dll -out:$@ $(srcdir)/bug-80307.cs
        cd $(top_builddir)/runtime && $(MAKE) test-support-files
 
 EXTRA_DIST += bug-81673-interface.cs
@@ -1420,7 +1623,10 @@ bug-81673.exe bug-81673-interface.dll: $(srcdir)/bug-81673.cs $(srcdir)/bug-8167
        $(MCS) -target:library -out:bug-81673-interface.dll $(srcdir)/bug-81673-interface.cs
        $(MCS) -out:bug-81673.exe -r:bug-81673-interface.dll $(srcdir)/bug-81673.cs
        $(MCS) -define:WITH_STOP -target:library -out:bug-81673-interface.dll $(srcdir)/bug-81673-interface.cs
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
@@ -1429,7 +1635,10 @@ bug-36848.exe bug-36848-a.dll: $(srcdir)/bug-36848.cs $(srcdir)/bug-36848-a.cs
        $(MCS) -target:library -out:bug-36848-a.dll $(srcdir)/bug-36848-a.cs
        $(MCS) -r:bug-36848-a.dll -out:bug-36848.exe $(srcdir)/bug-36848.cs
        $(MCS) -target:library -out:bug-36848-a.dll $(srcdir)/bug-36848-a.cs /define:WITH_STOP
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
@@ -1444,7 +1653,10 @@ bug-81691.exe: bug-81691-b.dll
 EXTRA_DIST += bug-81466-lib.il
 bug-81466-lib.dll: bug-81466-lib.il
        $(ILASM) /dll /output:bug-81466-lib.dll $(srcdir)/bug-81466-lib.il
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 bug-81466.exe: bug-81466.il bug-81466-lib.dll
@@ -1453,7 +1665,10 @@ bug-81466.exe: bug-81466.il bug-81466-lib.dll
 EXTRA_DIST += bug-324535-il.il
 bug-324535-il.dll : bug-324535-il.il
        $(ILASM) /dll /output:bug-324535-il.dll $(srcdir)/bug-324535-il.il
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 bug-324535.exe : bug-324535.cs bug-324535-il.dll
@@ -1462,7 +1677,10 @@ bug-324535.exe : bug-324535.cs bug-324535-il.dll
 EXTRA_DIST += custom-modifiers.2.cs custom-modifiers-lib.il
 custom-modifiers-lib.dll: custom-modifiers-lib.il
        $(ILASM) /dll /output:custom-modifiers-lib.dll $(srcdir)/custom-modifiers-lib.il
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 custom-modifiers.2.exe: custom-modifiers.2.cs custom-modifiers-lib.dll
@@ -1471,7 +1689,10 @@ custom-modifiers.2.exe: custom-modifiers.2.cs custom-modifiers-lib.dll
 EXTRA_DIST += bug-382986-lib.cs
 bug-382986-lib.dll: bug-382986-lib.cs
        $(MCS) -target:library -out:$@ $(srcdir)/bug-382986-lib.cs
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
@@ -1482,9 +1703,15 @@ EXTRA_DIST += bug-17537-helper.cs
 bug-17537-helper.exe: bug-17537-helper.cs
        $(MCS) -out:$@ $(srcdir)/bug-17537-helper.cs
        chmod -x $@
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
 
 bug-17537.exe: bug-17537.cs bug-17537-helper.exe
-       $(MCS) -r:System.dll -out:$@ $(srcdir)/bug-17537.cs
+       $(MCS) -r:$(CLASS)/System.dll -out:$@ $(srcdir)/bug-17537.cs
 
 EXTRA_DIST += coreclr-security.cs
 
@@ -1498,14 +1725,20 @@ test-coreclr-security : coreclr-security.exe
 EXTRA_DIST += generic-unboxing.2.il
 generic-unboxing.2.dll : generic-unboxing.2.il
        $(ILASM) /dll /output:generic-unboxing.2.dll $(srcdir)/generic-unboxing.2.il
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
 EXTRA_DIST += generic-boxing.2.il
 generic-boxing.2.dll : generic-boxing.2.il generic-unboxing.2.dll
        $(ILASM) /dll /output:generic-boxing.2.dll $(srcdir)/generic-boxing.2.il
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
@@ -1520,60 +1753,87 @@ generic-box.2.exe : generic-box.2.cs generic-unboxing.2.dll generic-boxing.2.dll
 EXTRA_DIST += generic-delegate2.2.cs generic-delegate2-lib.2.il
 generic-delegate2-lib.2.dll : generic-delegate2-lib.2.il
        $(ILASM) /dll /output:$@ $(srcdir)/generic-delegate2-lib.2.il
-if INSTALL_MOBILE_STATIC
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 generic-delegate2.2.exe : generic-delegate2.2.cs generic-delegate2-lib.2.dll
        $(MCS) -r:generic-delegate2-lib.2.dll -out:$@ $(srcdir)/generic-delegate2.2.cs
 
 bug-3903.exe: bug-3903.cs
-       $(MCS_NO_LIB) -lib:$(srcdir)/../../external/binary-reference-assemblies/v2.0/ $(srcdir)/bug-3903.cs -r:System.Core.dll -out:$@
+       $(MCS_NO_LIB)  $(srcdir)/bug-3903.cs -nostdlib -r:$(srcdir)/../../external/binary-reference-assemblies/v2.0/mscorlib.dll -r:$(srcdir)/../../external/binary-reference-assemblies/v2.0/System.Core.dll -out:$@
 
 gshared: test-generic-sharing
 
 gshared-aot:
        @$(MAKE) AOT=1 gshared
 
-GSHARED_TESTS_MOBILE_STATIC_NOT_SUPPORTED = \
-               generic-type-builder.2.exe
-
-GSHARED_TESTS_UNIVERSAL = \
-               generics-sharing.2.exe shared-generic-methods.2.exe     \
-               shared-generic-synchronized.2.exe generic-initobj.2.exe         \
-               generics-sharing-other-exc.2.exe generic-box.2.exe              \
-               generic-unbox.2.exe generic-delegate.2.exe generic-sizeof.2.exe \
-               generic-ldobj.2.exe generic-mkrefany.2.exe                      \
-               generic-refanyval.2.exe generic-ldtoken.2.exe                   \
-               generic-ldtoken-method.2.exe  generic-ldtoken-field.2.exe       \
-               generic-virtual.2.exe generic-tailcall.2.exe                    \
-               generic-interface-methods.2.exe generic-array-type.2.exe        \
-               generic-method-patching.2.exe generic-static-methods.2.exe      \
-               generic-null-call.2.exe generic-tailcall2.2.exe                 \
-               generic-array-exc.2.exe generic-special.2.exe                   \
-               generic-exceptions.2.exe generic-delegate2.2.exe                \
-               generic-virtual2.2.exe generic-valuetype-interface.2.exe        \
-               generic-valuetype-newobj.2.exe generic-valuetype-newobj2.2.exe  \
-               generic-getgenericarguments.2.exe       \
-               generic-synchronized.2.exe generic-delegate-ctor.2.exe          \
-               generic-constrained.2.exe bug-431413.2.exe                      \
-               generic-virtual-invoke.2.exe generic-typedef.2.exe              \
-               generic-marshalbyref.2.exe bug-459285.2.exe bug-461198.2.exe    \
-               generic-sealed-virtual.2.exe generic-system-arrays.2.exe        \
-               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-type-load-exception.2.exe bug-616463.exe        \
-               bug-1147.exe
-
-if INSTALL_MOBILE_STATIC
-GSHARED_TESTS= \
-       $(GSHARED_TESTS_UNIVERSAL)
-else
-GSHARED_TESTS= \
-       $(GSHARED_TESTS_MOBILE_STATIC_NOT_SUPPORTED) \
-       $(GSHARED_TESTS_UNIVERSAL)
+GSHARED_TESTS_SRC = \
+       generics-sharing.2.cs   \
+       shared-generic-methods.2.cs     \
+       shared-generic-synchronized.2.cs        \
+       generic-initobj.2.cs            \
+       generics-sharing-other-exc.2.cs \
+       generic-box.2.cs                \
+       generic-unbox.2.cs      \
+       generic-delegate.2.cs   \
+       generic-sizeof.2.cs     \
+       generic-ldobj.2.cs      \
+       generic-mkrefany.2.cs                   \
+       generic-refanyval.2.cs  \
+       generic-ldtoken.2.cs                    \
+       generic-ldtoken-method.2.cs     \
+       generic-ldtoken-field.2.cs      \
+       generic-virtual.2.cs    \
+       generic-tailcall.2.cs                   \
+       generic-interface-methods.2.cs  \
+       generic-array-type.2.cs \
+       generic-method-patching.2.cs    \
+       generic-static-methods.2.cs     \
+       generic-null-call.2.cs  \
+       generic-tailcall2.2.cs                  \
+       generic-array-exc.2.cs  \
+       generic-special.2.cs                    \
+       generic-exceptions.2.cs \
+       generic-delegate2.2.cs          \
+       generic-virtual2.2.cs   \
+       generic-valuetype-interface.2.cs        \
+       generic-valuetype-newobj.2.cs   \
+       generic-valuetype-newobj2.2.cs  \
+       generic-getgenericarguments.2.cs        \
+       generic-synchronized.2.cs       \
+       generic-delegate-ctor.2.cs              \
+       generic-constrained.2.cs        \
+       bug-431413.2.cs                 \
+       generic-virtual-invoke.2.cs     \
+       generic-typedef.2.cs            \
+       generic-marshalbyref.2.cs       \
+       bug-459285.2.cs \
+       bug-461198.2.cs \
+       generic-sealed-virtual.2.cs     \
+       generic-system-arrays.2.cs      \
+       generic-stack-traces.2.cs       \
+       generic-stack-traces2.2.cs              \
+       bug-472600.2.cs \
+       bug-473482.2.cs \
+       bug-473999.2.cs         \
+       bug-479763.2.cs                         \
+       generic-type-load-exception.2.cs        \
+       bug-616463.cs   \
+       bug-1147.cs     \
+       generic-type-builder.2.cs
+
+GSHARED_DISABLED_TESTS=
+
+if FULL_AOT_TESTS
+GSHARED_DISABLED_TESTS += \
+       generic-type-builder.2.exe
 endif
 
+GSHARED_TESTS=$(filter-out $(GSHARED_DISABLED_TESTS),$(GSHARED_TESTS_SRC:.cs=.exe))
+
 test-generic-sharing-normal: $(GSHARED_TESTS)
        @for fn in $+ ; do      \
                echo "Testing $$fn ...";        \
@@ -1585,7 +1845,7 @@ test-generic-sharing-normal: $(GSHARED_TESTS)
        done
 
 test-generic-sharing-managed: test-runner.exe $(GSHARED_TESTS)
-       @$(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name "gshared" --disabled "$(DISABLED_TESTS)" --opt-sets "gshared gshared,shared gshared,-inline gshared,-inline,shared" $(GSHARED_TESTS)
+       $(Q) $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name "gshared" --disabled "$(DISABLED_TESTS)" --opt-sets "gshared gshared,shared gshared,-inline gshared,-inline,shared" $(GSHARED_TESTS)
 
 if NACL_CODEGEN
 test-generic-sharing:
@@ -1626,18 +1886,6 @@ test-process-exit:
        @diff -w threadpool-in-processexit.exe.stdout $(srcdir)/threadpool-in-processexit.exe.stdout.expected
 endif
 
-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 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
-
 if HOST_WIN32
 test-unhandled-exception-2:
 else
@@ -1653,7 +1901,8 @@ UNHANDLED_EXCEPTION_255_TESTS =   \
        unhandled-exception-4.exe       \
        unhandled-exception-5.exe       \
        unhandled-exception-6.exe       \
-       unhandled-exception-7.exe
+       unhandled-exception-7.exe       \
+       unhandled-exception-8.exe
 
 test-unhandled-exception-2: $(UNHANDLED_EXCEPTION_1_TESTS) $(UNHANDLED_EXCEPTION_255_TESTS)
        $(MAKE) test-unhandled-exception-2-1-with-managed-handler
@@ -1662,13 +1911,13 @@ test-unhandled-exception-2: $(UNHANDLED_EXCEPTION_1_TESTS) $(UNHANDLED_EXCEPTION
        $(MAKE) test-unhandled-exception-2-255-without-managed-handler
 
 test-unhandled-exception-2-1-with-managed-handler: $(UNHANDLED_EXCEPTION_1_TESTS) test-runner.exe
-       $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 1 $(UNHANDLED_EXCEPTION_1_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 1 $(UNHANDLED_EXCEPTION_1_TESTS)
 test-unhandled-exception-2-1-without-managed-handler: $(UNHANDLED_EXCEPTION_1_TESTS) test-runner.exe
-       TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 1 $(UNHANDLED_EXCEPTION_1_TESTS)
+       TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 1 $(UNHANDLED_EXCEPTION_1_TESTS)
 test-unhandled-exception-2-255-with-managed-handler: $(UNHANDLED_EXCEPTION_255_TESTS) test-runner.exe
-       $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 255 $(UNHANDLED_EXCEPTION_255_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 255 $(UNHANDLED_EXCEPTION_255_TESTS)
 test-unhandled-exception-2-255-without-managed-handler: $(UNHANDLED_EXCEPTION_255_TESTS) test-runner.exe
-       TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 255 $(UNHANDLED_EXCEPTION_255_TESTS)
+       TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 255 $(UNHANDLED_EXCEPTION_255_TESTS)
 
 endif
 
@@ -1686,6 +1935,17 @@ test-console-output: console-output.exe
        @diff -w console-output.exe.stdout $(srcdir)/console-output.exe.stdout.expected \
                && diff -w console-output.exe.stderr $(srcdir)/console-output.exe.stderr.expected
 
+test-pedump: test-runner.exe
+       $(with_mono_path) $(mono_build_root)/tools/pedump/pedump --verify error test-runner.exe
+
+.PHONY: test-gac-loading
+
+runtest-gac-loading: test-runner.exe
+       $(MAKE) -C testing_gac runtest
+
+compile-gac-loading:
+       $(MAKE) -C testing_gac compile-tests
+
 PROCESS_STRESS_TESTS=  \
                process-stress-1.exe    \
                process-stress-2.exe    \
@@ -1693,11 +1953,16 @@ PROCESS_STRESS_TESTS=   \
                process-leak.exe
 
 test-process-stress: $(PROCESS_STRESS_TESTS) test-runner.exe
-       $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 600 $(PROCESS_STRESS_TESTS)
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 600 $(PROCESS_STRESS_TESTS)
 
 coreclr-gcstress:
        $(MAKE) -C $(mono_build_root)/acceptance-tests coreclr-gcstress
 
+# Tests for the Mono lldb plugin
+EXTRA_DIST += test_lldb.py test-lldb.cs
+test-lldb: test-lldb.exe
+       python test_lldb.py $(JITTEST_PROG)
+
 noinst_LTLIBRARIES = libtest.la
 
 AM_CPPFLAGS = $(GLIB_CFLAGS)