Bump corefx
[mono.git] / mcs / build / tests.make
index b9f869e651d99e4a6de6baa049e7462eadc33549..054de2582a1750be5601bc6fb4bc377464e07e5b 100644 (file)
@@ -22,7 +22,7 @@ ifndef NO_TEST
 test_nunit_lib = nunitlite.dll
 xunit_core := xunit.core xunit.abstractions xunit.assert Xunit.NetCore.Extensions
 xunit_deps := System.Runtime
-xunit_src  := $(patsubst %,$(topdir)/../external/xunit-binaries/%,BenchmarkAttribute.cs BenchmarkDiscover.cs)
+xunit_src  := $(patsubst %,$(topdir)/../external/xunit-binaries/%,BenchmarkAttribute.cs BenchmarkDiscover.cs) $(topdir)/../mcs/class/test-helpers/PlatformDetection.cs
 xunit_class_deps := 
 
 xunit_libs_ref = $(patsubst %,-r:$(topdir)/../external/xunit-binaries/%.dll,$(xunit_core))
@@ -94,12 +94,8 @@ endif
 
 test_assemblies :=
 
-test_lib_dir = $(topdir)/class/lib/$(PROFILE)/tests
-
-test_lib_output = $(topdir)/class/lib/$(PROFILE)/tests/$(test_lib)
-
 ifdef HAVE_CS_TESTS
-test_assemblies += $(test_lib_output)
+test_assemblies += $(test_lib)
 endif
 
 ifdef test_assemblies
@@ -145,39 +141,10 @@ ifdef TEST_NUNITLITE_APP_CONFIG_RUNTIME
        sed -i -e "/__INSERT_CUSTOM_APP_CONFIG_RUNTIME__/r $(TEST_NUNITLITE_APP_CONFIG_RUNTIME)" $(NUNITLITE_CONFIG_FILE)
 endif
 
-ifdef PLATFORM_AOT_SUFFIX
-
-MKBUNDLE_TEST_BIN = $(TEST_HARNESS).static
-MKBUNDLE_EXE = $(topdir)/class/lib/$(PROFILE)/mkbundle.exe
-# Pattern based on the one in AOT_PROFILE_ASSEMBLIES 
-# It's easier if you read it backwards.
-# What we do here is get the files in the profile directory that end in "test.dll" or are prefixed with nunit (filter)
-# and then strip out everything that we expect to live outside the top level (filter-out)
-TEST_ASSEMBLIES:=$(sort $(patsubst .//%,%,$(filter-out %.exe.static %.dll.dll %.exe.dll %bare% %plaincore% %secxml% %Facades% %ilasm%,$(filter %.dll,$(wildcard $(topdir)/class/lib/$(PROFILE)/tests/*)))))
-
-$(MKBUNDLE_EXE): $(topdir)/tools/mkbundle/mkbundle.cs
-       make -C $(topdir)/tools/mkbundle
-
-mkbundle-all-tests:
-       $(Q_AOT) $(MAKE) -C $(topdir)/class do-test
-       $(Q_AOT) $(MAKE) -C $(topdir)/tools/mkbundle
-       $(Q_AOT) $(MAKE) $(MKBUNDLE_TEST_BIN) # recursive make re-computes variables for TEST_ASSEMBLIES
-
-$(MKBUNDLE_TEST_BIN): $(TEST_ASSEMBLIES) $(TEST_HARNESS) $(MKBUNDLE_EXE)
-       $(Q_AOT) MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)" PKG_CONFIG_PATH="$(topdir)/../data" $(RUNTIME) $(RUNTIME_FLAGS) $(MKBUNDLE_EXE) -L $(topdir)/class/lib/$(PROFILE) -v --deps $(TEST_HARNESS) $(TEST_ASSEMBLIES) -o $(MKBUNDLE_TEST_BIN) --aot-mode $(AOT_MODE) --aot-runtime $(RUNTIME) --aot-args $(AOT_BUILD_ATTRS) --in-tree $(topdir)/.. --cil-strip $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/mono-cil-strip.exe --managed-linker $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/monolinker.exe
-
-endif # PLATFORM_AOT_SUFFIX
-
-ifneq ($(wildcard $(MKBUNDLE_TEST_BIN)),)
-TEST_HARNESS_EXEC = $(MKBUNDLE_TEST_BIN)
-else 
-TEST_HARNESS_EXEC = $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(TEST_HARNESS) 
-endif
-
 ## FIXME: i18n problem in the 'sed' command below
 run-test-lib: test-local test-local-aot-compile patch-nunitlite-appconfig
        ok=:; \
-       PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_HARNESS_EXEC) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(LABELS_ARG) -format:nunit2 -result:TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
+       PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(TEST_HARNESS) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(LABELS_ARG) -format:nunit2 -result:TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
        if [ ! -f "TestResult-$(PROFILE).xml" ]; then echo "<?xml version='1.0' encoding='utf-8'?><test-results failures='1' total='1' not-run='0' name='bcl-tests' date='$$(date +%F)' time='$$(date +%T)'><test-suite name='$(strip $(test_assemblies))' success='False' time='0'><results><test-case name='crash' executed='True' success='False' time='0'><failure><message>The test runner didn't produce a test result XML, probably due to a crash of the runtime. Check the log for more details.</message><stack-trace></stack-trace></failure></test-case></results></test-suite></test-results>" > TestResult-$(PROFILE).xml; fi; \
        $$ok
 
@@ -199,10 +166,7 @@ endif
 
 ifdef HAVE_CS_TESTS
 
-$(test_lib_dir):
-       mkdir -p $@
-
-$(test_lib_output): $(the_assembly) $(test_response) $(test_nunit_dep) $(test_lib_dir)
+$(test_lib): $(the_assembly) $(test_response) $(test_nunit_dep)
        $(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response)
 
 test_response_preprocessed = $(test_response)_preprocessed
@@ -222,7 +186,7 @@ $(test_makefrag): $(test_response)
 
 -include $(test_makefrag)
 
-build-test-lib: $(test_lib_output)
+build-test-lib: $(test_lib)
        @echo Building testing lib
 
 endif
@@ -248,9 +212,9 @@ run-xunit-test: run-xunit-test-local
 xunit-test-local: $(xunit_test_lib)
 run-xunit-test-local: run-xunit-test-lib
 
-# ln -s is a HACK for xunit runner to require xunit.execution.desktop.dll file in local folder on .net only
+# cp -rf is a HACK for xunit runner to require xunit.execution.desktop.dll file in local folder on .net only
 run-xunit-test-lib: xunit-test-local
-       @ln -fs $(XTEST_HARNESS_PATH)/xunit.execution.desktop.dll xunit.execution.desktop.dll
+       @cp -rf $(XTEST_HARNESS_PATH)/xunit.execution.desktop.dll xunit.execution.desktop.dll
        ok=:; \
        PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(XTEST_HARNESS) $(xunit_test_lib) $(XTEST_HARNESS_FLAGS) $(XTEST_TRAIT) || ok=false; \
        $$ok