Imported Upstream version 5.20.0.180

Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-02-04 20:11:37 +00:00
parent 0e2d47d1c8
commit 0510252385
3360 changed files with 83827 additions and 39243 deletions

View File

@@ -34,11 +34,11 @@ static class Consts
// Use these assembly version constants to make code more maintainable.
//
public const string MonoVersion = "5.18.0.252";
public const string MonoVersion = "5.20.0.180";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";
public const string MonoCorlibVersion = "179F7FD7-9CE8-424E-84AF-0DF5B0B8B469";
public const string MonoCorlibVersion = "B886E13F-6276-4BE5-85F8-C6BF5EDBD200";
#if MOBILE
// Versions of .NET Framework for Silverlight 4.0

View File

@@ -41,7 +41,7 @@ class X
Version min_mono_version;
#if __MonoCS__
min_mono_version = new Version (5, 18);
min_mono_version = new Version (5, 19);
#else
min_mono_version = new Version (5, 10);
#endif

View File

@@ -68,7 +68,7 @@ public static class Program {
Console.Error.WriteLine ("--stdout");
Console.Error.WriteLine (" Writes results to standard output (omit outputFileName if you use this)");
Console.Error.WriteLine ("--strict");
Console.Error.WriteLine (" Produces an error exit code if files or directories are invalid/missing");
Console.Error.WriteLine (" Produces an error exit code if files or directories are invalid/missing or other warnings occur");
Console.Error.WriteLine ("--basedir:<dir>");
Console.Error.WriteLine (" Sets the base directory when reading a single sources/exclusions pair (default is the directory containing the sources file)");
return 1;
@@ -449,7 +449,7 @@ public class SourcesParser {
return state.Result;
}
testPath = Path.Combine (libraryDirectory, $"{hostPlatform}_{libraryName}");
testPath = Path.Combine (libraryDirectory, $"{hostPlatform}_defaultprofile_{libraryName}");
ok = TryParseTargetInto (state, testPath);
if (ok) {
@@ -517,18 +517,37 @@ public class SourcesParser {
var platformFallbackTargets = new List<TargetParseResult> ();
var ambiguousSourcesNames = new List<string> ();
foreach (var hostPlatform in AllHostPlatformNames) {
state.ProfileName = null;
state.HostPlatform = hostPlatform;
var testPath = Path.Combine (libraryDirectory, $"{hostPlatform}_{libraryName}");
var testPath = Path.Combine (libraryDirectory, $"{hostPlatform}_defaultprofile_{libraryName}");
var target = ParseTarget (state, testPath, defaultTarget);
if ((target != null) && target.IsFallback)
platformFallbackTargets.Add (target);
if ((target == null) || target.IsFallback) {
var oldTestPath = Path.Combine (libraryDirectory, $"{hostPlatform}_{libraryName}.sources");
if (File.Exists (oldTestPath))
ambiguousSourcesNames.Add (oldTestPath);
oldTestPath = Path.Combine (libraryDirectory, $"{hostPlatform}_{libraryName}.exclude.sources");
if (File.Exists (oldTestPath))
ambiguousSourcesNames.Add (oldTestPath);
}
}
StripFallbackTargetsOrDefaultTarget (state, defaultTarget, platformFallbackTargets, AllHostPlatformNames.Length);
foreach (var path in ambiguousSourcesNames) {
if (!state.Result.SourcesFiles.ContainsKey (path) && !state.Result.ExclusionFiles.ContainsKey (path)) {
Console.Error.WriteLine ($"// The file '{path}' was found but not used by sources parsing. Did you mean hostPlatform_defaultprofile_{libraryName}?");
state.Result.ErrorCount += 1;
}
}
PrintSummary (state, originalTestPath);
return state.Result;

View File

@@ -14,13 +14,12 @@
# command line.
#
# All dependent libs become dependent dirs for parallel builds
# Have to rename to handle differences between assembly/directory names
DEP_LIBS=$(patsubst System.Xml,System.XML,$(LIB_REFS))
LIB_REFS_FULL = $(call _FILTER_OUT,=, $(LIB_REFS)) $(DEFAULT_REFERENCES)
LIB_REFS_ALIAS = $(filter-out $(LIB_REFS_FULL),$(LIB_REFS))
# All dependent libs become dependent dirs for parallel builds
DEP_LIBS = $(filter-out %=, $(subst =,= ,$(LIB_REFS)))
ifdef TARGET_NET_REFERENCE
# System*, mscorlib references come from the TARGET_NET_REFERENCE dir, others from the profile dir
LIB_REFS_MONO_FULL = $(call _FILTER_OUT,System,$(call _FILTER_OUT,mscorlib,$(LIB_REFS_FULL)))
@@ -75,17 +74,6 @@ endif
endif
endif
#
# The bare directory contains the plain versions of System and System.Xml
#
bare_libdir = $(the_libdir_base)bare
#
# The secxml directory contains the System version that depends on
# System.Xml and Mono.Security
#
secxml_libdir = $(the_libdir_base)secxml
the_libdir = $(the_libdir_base)$(intermediate)
ifdef LIBRARY_USE_INTERMEDIATE_FILE

View File

@@ -122,7 +122,7 @@ $(PROFILE_EXE): $(topdir)/build/common/basic-profile-check.cs $(GENSOURCES_CS)
$(BOOTSTRAP_MCS) /noconfig /langversion:latest /r:mscorlib.dll /r:System.dll /r:System.Core.dll /out:$(GENSOURCES_EXE).tmp $(GENSOURCES_CS)
- rm $(GENSOURCES_EXE)
mv $(GENSOURCES_EXE).tmp $(GENSOURCES_EXE)
- rm $@
- rm -f $@
mv $@.tmp $@
$(PROFILE_OUT): $(PROFILE_EXE)

View File

@@ -23,4 +23,5 @@ ENFORCE_LIBRARY_WARN_AS_ERROR = yes
ifdef PLATFORM_MACOS
MONO_FEATURE_APPLETLS=1
ENABLE_GSS=1
endif

View File

@@ -54,7 +54,7 @@ INTERNAL_CSC_LOCATION = $(CSC_LOCATION)
INTERNAL_CSC = CSC_SDK_PATH_DISABLED= $(RUNTIME) $(RUNTIME_FLAGS) $(CSC_RUNTIME_FLAGS) $(INTERNAL_CSC_LOCATION)
RESGEN = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resgen.exe
STRING_REPLACER = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/cil-stringreplacer.exe
STRING_REPLACER = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/tmp/cil-stringreplacer.exe
ILASM = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/ilasm.exe
GENSOURCES_LIBDIR = $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)
GENSOURCES_CS = $(topdir)/build/gensources.cs
@@ -243,6 +243,9 @@ endif
$(if $(filter $*,all), \
$(MAKE) $(PROFILE_PARALLEL_SUBDIRS) ENABLE_PARALLEL_SUBDIR_BUILD=1 || { final_exit="exit 1"; $$dk; };, \
$(foreach subdir,$(PROFILE_PARALLEL_SUBDIRS),$(MAKE) -C $(subdir) $* || { final_exit="exit 1"; $$dk; };))) \
$(if $(FACADES_FOLDER), \
$(MAKE) -C $(FACADES_FOLDER) $* || { final_exit="exit 1"; $$dk; }; \
) \
$$final_exit
ifdef ENABLE_PARALLEL_SUBDIR_BUILD
@@ -264,15 +267,24 @@ endif
# directories it depends on.
#
ifneq ($(PROFILE_PARALLEL_SUBDIRS),)
dep_dirs = .dep_dirs-$(PROFILE)
$(dep_dirs):
@echo "Creating $@..."
#
# This should track dependencies better but the variable can be defined in any
# Makefile dependency. On top of that we should also regenerate when any of the
# PROFILE_PARALLEL_SUBDIRS Makefile's are changed
#
$(dep_dirs): Makefile
$(if $(V),@echo "Creating $(abspath $@)...",)
list='$(PROFILE_PARALLEL_SUBDIRS)'; \
echo > $@; \
for d in $$list; do \
$(MAKE) -C $$d gen-deps DEPS_TARGET_DIR=$$d DEPS_FILE=$(abspath $@); \
done
-include $(dep_dirs)
endif
.PHONY: gen-deps

View File

@@ -44,8 +44,15 @@ $(topdir)/../external/corefx/src/Common/src/System/PasteArguments.Unix.cs
ifeq ($(PROFILE),monodroid)
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
else
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mono.cs \
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs
ifeq ($(PROFILE),monotouch_tv)
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
else
ifeq ($(PROFILE),monotouch_watch)
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
else
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mono.cs $(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs
endif
endif
endif
endif
@@ -85,7 +92,7 @@ test_assembly_dep = $(the_assembly)
endif
tests_CLEAN_FILES += $(test_lib_output) $(test_lib_output:$(ASSEMBLY_EXT)=.pdb) $(test_response) $(test_makefrag)
xtest_sourcefile = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
xtest_sourcefile = $(PROFILE_PLATFORM)_$(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
xtest_sourcefile_excludes = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.exclude.sources)
xunit_test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xunit-test.dll)
@@ -169,14 +176,20 @@ endif
NUNITLITE_CONFIG_FILE=$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)nunit-lite-console.exe.config
patch-nunitlite-appconfig:
cp -f $(topdir)/tools/nunit-lite/nunit-lite-console/nunit-lite-console.exe.config.tmpl $(NUNITLITE_CONFIG_FILE)
$(test_lib_output).nunitlite.config: $(topdir)/tools/nunit-lite/nunit-lite-console/nunit-lite-console.exe.config.tmpl $(TEST_NUNITLITE_APP_CONFIG_GLOBAL) $(TEST_NUNITLITE_APP_CONFIG_RUNTIME) $(TEST_NUNITLITE_APP_CONFIG_SUPPLEMENTAL) | $(test_lib_dir)
cp -f $(topdir)/tools/nunit-lite/nunit-lite-console/nunit-lite-console.exe.config.tmpl $(test_lib_output).nunitlite.config
ifdef TEST_NUNITLITE_APP_CONFIG_GLOBAL
sed -i -e "/__INSERT_CUSTOM_APP_CONFIG_GLOBAL__/r $(TEST_NUNITLITE_APP_CONFIG_GLOBAL)" $(NUNITLITE_CONFIG_FILE)
sed -i -e "/__INSERT_CUSTOM_APP_CONFIG_GLOBAL__/r $(TEST_NUNITLITE_APP_CONFIG_GLOBAL)" $(test_lib_output).nunitlite.config
endif
ifdef TEST_NUNITLITE_APP_CONFIG_RUNTIME
sed -i -e "/__INSERT_CUSTOM_APP_CONFIG_RUNTIME__/r $(TEST_NUNITLITE_APP_CONFIG_RUNTIME)" $(NUNITLITE_CONFIG_FILE)
sed -i -e "/__INSERT_CUSTOM_APP_CONFIG_RUNTIME__/r $(TEST_NUNITLITE_APP_CONFIG_RUNTIME)" $(test_lib_output).nunitlite.config
endif
ifdef TEST_NUNITLITE_APP_CONFIG_SUPPLEMENTAL
cp -f $(TEST_NUNITLITE_APP_CONFIG_SUPPLEMENTAL) $(test_lib_output).nunitlite.config.$(TEST_NUNITLITE_APP_CONFIG_SUPPLEMENTAL)
endif
copy-nunitlite-appconfig: $(test_lib_output).nunitlite.config
cp -f $(test_lib_output).nunitlite.config $(NUNITLITE_CONFIG_FILE)
ifdef PLATFORM_AOT_SUFFIX
@@ -222,7 +235,7 @@ TEST_HARNESS_EXEC=$(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) $(TEST_COVERAGE_FLAGS) $
endif
## FIXME: i18n problem in the 'sed' command below
run-test-lib: test-local test-local-aot-compile patch-nunitlite-appconfig
run-test-lib: test-local test-local-aot-compile copy-nunitlite-appconfig
ok=:; \
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" DBG_RUNTIME_ARGS="$(TEST_RUNTIME_FLAGS)" $(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; \
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='$(notdir $(strip $(test_assemblies))).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; \
@@ -249,7 +262,7 @@ ifdef HAVE_CS_TESTS
$(test_lib_dir):
mkdir -p $@
$(test_lib_output): $(test_assembly_dep) $(test_response) $(test_nunit_dep) | $(test_lib_dir)
$(test_lib_output): $(test_assembly_dep) $(test_response) $(test_nunit_dep) $(test_lib_output).nunitlite.config | $(test_lib_dir)
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response)
test_response_preprocessed = $(test_response)_preprocessed
@@ -335,7 +348,7 @@ xtest_response_preprocessed = $(xtest_response)_preprocessed
# This handles .excludes/.sources pairs, as well as resolving the
# includes that occur in .sources files
$(xtest_response): $(xtest_sourcefile) $(wildcard $(xtest_sourcefile_excludes)) $(GENSOURCES_CS)
$(xtest_response): $(xtest_sourcefile) $(wildcard *xtest.dll.sources) $(wildcard $(xtest_sourcefile_excludes)) $(GENSOURCES_CS)
$(GENSOURCES_RUNTIME) --debug $(GENSOURCES_EXE) --strict "$@" "$(xtest_sourcefile)" "$(xtest_sourcefile_excludes)"
$(xtest_makefrag): $(xtest_response)