diff --git a/tests/.gitignore b/tests/.gitignore index 747c00e47b3f..8ef48d136ca8 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -19,7 +19,6 @@ Info-*.plist Makefile.inc *.stamp test.config -test-system.config mac-test-package dotnet-test-package .nuget diff --git a/tests/Makefile b/tests/Makefile index 6a0802b2f561..840a325e5cca 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -79,36 +79,6 @@ test.config: Makefile $(TOP)/Make.config $(TOP)/eng/Version.Details.xml @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(platform)_NUGET_OS_VERSION=$($(platform)_NUGET_OS_VERSION)\\n)" | sed 's/^ //' >> $@ @printf "NUGET_PRERELEASE_IDENTIFIER=$(NUGET_PRERELEASE_IDENTIFIER)\n" >> $@ -test-system.config: Makefile $(TOP)/Make.config $(TOP)/eng/Version.Details.xml - @rm -f $@ - @echo "JENKINS_RESULTS_DIRECTORY=$(abspath $(JENKINS_RESULTS_DIRECTORY))" >> $@ - @echo "DOTNET=$(DOTNET)" >> $@ - @echo "IOS_SDK_VERSION=$(IOS_SDK_VERSION)" >> $@ - @echo "TVOS_SDK_VERSION=$(TVOS_SDK_VERSION)" >> $@ - @echo "MACOS_SDK_VERSION=$(MACOS_SDK_VERSION)" >> $@ - @echo "DOTNET_TFM=$(DOTNET_TFM)" >> $@ - @echo "DOTNET_BCL_DIR=$(DOTNET_BCL_DIR)" >> $@ - @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),DOTNET_$(platform)_RUNTIME_IDENTIFIERS='$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS)'\\n)" | sed 's/^ //' >> $@ - @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),DOTNET_$(rid)_ARCHITECTURES='$(DOTNET_$(rid)_ARCHITECTURES)'\\n))" | sed 's/^ //' >> $@ - @echo "DOTNET_CSC_COMMAND='$(DOTNET_CSC)'" >> $@ - @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(platform)_NUGET_VERSION_NO_METADATA=$($(platform)_NUGET_VERSION_NO_METADATA)\\n)" | sed 's/^ //' >> $@ - @echo "DOTNET_DIR=$(DOTNET_DIR)" >> $@ - @echo "INCLUDE_IOS=$(INCLUDE_IOS)" >> $@ - @echo "INCLUDE_TVOS=$(INCLUDE_TVOS)" >> $@ - @echo "INCLUDE_MAC=$(INCLUDE_MAC)" >> $@ - @echo "INCLUDE_MACCATALYST=$(INCLUDE_MACCATALYST)" >> $@ - @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(platform)_NUGET_SDK_NAME=$($(platform)_NUGET_SDK_NAME)\\n)" | sed 's/^ //' >> $@ - @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(platform)_NUGET_REF_NAME=$($(platform)_NUGET_REF_NAME)\\n)" | sed 's/^ //' >> $@ - @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(platform)_NUGET_RUNTIME_MANAGED_NAME=$($(platform)_NUGET_RUNTIME_MANAGED_NAME)\\n)" | sed 's/^ //' >> $@ - @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(rid)_NUGET_RUNTIME_NAME=$($(rid)_NUGET_RUNTIME_NAME)\\n))" | sed 's/^ //' >> $@ - @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),SUPPORTED_API_VERSIONS_$(platform)='$(SUPPORTED_API_VERSIONS_$(platform))'\\n)" | sed 's/^ //' >> $@ - @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(platform)_TARGET_PLATFORM_VERSION_LIBRARY=$($(platform)_TARGET_PLATFORM_VERSION_LIBRARY)\\n)" | sed 's/^ //' >> $@ - @printf "XCODE_IS_STABLE=$(XCODE_IS_STABLE)\n" >> $@ - @printf "XCODE_VERSION=$(XCODE_VERSION)\n" >> $@ - @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),DOTNET_MIN_$(platform)_SDK_VERSION=$(DOTNET_MIN_$(platform)_SDK_VERSION)\\n)" | sed 's/^ //' >> $@ - @printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(platform)_NUGET_OS_VERSION=$($(platform)_NUGET_OS_VERSION)\\n)" | sed 's/^ //' >> $@ - @printf "NUGET_PRERELEASE_IDENTIFIER=$(NUGET_PRERELEASE_IDENTIFIER)\n" >> $@ - ## run targets = build + [install] + exec run run-all run-tests run-test run-unit-tests: @@ -146,7 +116,7 @@ $(TOP)/tools/common/SdkVersions.cs: $(TOP)/tools/common/SdkVersions.in.cs -include xharness/xharness.csproj.inc $(XHARNESS_EXECUTABLE): MSBUILD_EXE_PATH= -$(XHARNESS_EXECUTABLE): $(xharness_dependencies) test.config test-system.config $(TOP)/tools/common/SdkVersions.cs +$(XHARNESS_EXECUTABLE): $(xharness_dependencies) test.config $(TOP)/tools/common/SdkVersions.cs $(Q_GEN) $(DOTNET) build "/bl:$@.binlog" $(MSBUILD_VERBOSITY_QUIET) xharness/xharness.csproj xharness/xharness.csproj.inc: export BUILD_VERBOSITY=$(DOTNET_BUILD_VERBOSITY) xharness/xharness.csproj.inc: export MSBUILD_EXE_PATH= @@ -183,7 +153,7 @@ else endif jenkins: $(XHARNESS_EXECUTABLE) - $(Q) $(DOTNET) $< $(XHARNESS_VERBOSITY) --jenkins --rootdir $(CURDIR) --sdkroot $(XCODE_DEVELOPER_ROOT) --markdown-summary=$(abspath $(CURDIR))/TestSummary.md --use-system=true $(TESTS_EXTRA_ARGUMENTS) $(TESTS_PERIODIC_COMMAND) + $(Q) $(DOTNET) $< $(XHARNESS_VERBOSITY) --jenkins --rootdir $(CURDIR) --sdkroot $(XCODE_DEVELOPER_ROOT) --markdown-summary=$(abspath $(CURDIR))/TestSummary.md $(TESTS_EXTRA_ARGUMENTS) $(TESTS_PERIODIC_COMMAND) # This will launch xharness' interactive test runner in the system's default browser runner: $(XHARNESS_EXECUTABLE) diff --git a/tests/common/Configuration.cs b/tests/common/Configuration.cs index 8154d4e9b100..909b3c08954f 100644 --- a/tests/common/Configuration.cs +++ b/tests/common/Configuration.cs @@ -51,19 +51,6 @@ public static Version DotNetVersion { get => Version.Parse (DotNetTfm.Replace ("net", "")); } - static bool? use_system; // if the system-installed XI/XM should be used instead of the local one. - - public static bool UseSystem { - get { - if (!use_system.HasValue) - use_system = !string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("TESTS_USE_SYSTEM")); - return use_system.Value; - } - set { - use_system = value; - } - } - static bool? is_vsts; // if the system-installed XI/XM should be used instead of the local one. public static bool IsVsts { @@ -149,7 +136,7 @@ static IEnumerable FindConfigFiles (string name) static void ParseConfigFiles () { - var test_config = FindConfigFiles (UseSystem ? "test-system.config" : "test.config"); + var test_config = FindConfigFiles ("test.config"); if (!test_config.Any () && Environment.OSVersion.Platform != PlatformID.Win32NT) { // Run 'make test.config' in the tests/ directory // First find the tests/ directory @@ -439,8 +426,6 @@ public static string GetDotNetRoot () public static string GetRefDirectory (ApplePlatform platform) { var rv = Path.Combine (GetDotNetRoot (), GetRefNuGetName (platform)); - if (UseSystem) - rv = Path.Combine (rv, GetNuGetVersionNoMetadata (platform)); rv = Path.Combine (rv, "ref", DotNetTfm); return rv; } @@ -468,8 +453,6 @@ public static string GetNuGetVersionNoMetadata (ApplePlatform platform) public static string GetRuntimeDirectory (ApplePlatform platform, string runtimeIdentifier, bool isManagedRuntimePack = false) { var rv = Path.Combine (GetDotNetRoot (), isManagedRuntimePack ? GetManagedRuntimeNuGetName (platform) : GetRuntimeNuGetName (platform, runtimeIdentifier)); - if (UseSystem) - rv = Path.Combine (rv, GetNuGetVersionNoMetadata (platform)); return Path.Combine (rv, "runtimes", runtimeIdentifier); } @@ -482,8 +465,6 @@ public static string GetSdkRoot (TargetFramework targetFramework) public static string GetSdkRoot (ApplePlatform platform) { var rv = Path.Combine (GetDotNetRoot (), GetSdkNuGetName (platform)); - if (UseSystem) - rv = Path.Combine (rv, GetNuGetVersionNoMetadata (platform)); return Path.Combine (rv, "tools"); } diff --git a/tests/mmptest/mmptest.csproj b/tests/mmptest/mmptest.csproj index a28ba735e604..2ff95169d89a 100644 --- a/tests/mmptest/mmptest.csproj +++ b/tests/mmptest/mmptest.csproj @@ -37,8 +37,7 @@ global,mmp - ..\..\_mac-build\Library\Frameworks\Xamarin.Mac.framework\Versions\git\lib\mmp\mmp.exe - \Library\Frameworks\Xamarin.Mac.framework\Versions\Current\lib\mmp\mmp.exe + ..\..\_mac-build\Library\Frameworks\Xamarin.Mac.framework\Versions\git\lib\mmp\mmp.exe diff --git a/tests/xharness/Harness.cs b/tests/xharness/Harness.cs index 33cf6b5ffb93..b1277346e328 100644 --- a/tests/xharness/Harness.cs +++ b/tests/xharness/Harness.cs @@ -44,7 +44,6 @@ public class HarnessConfiguration { public string? SdkRoot { get; set; } public TestTarget Target { get; set; } public double TimeoutInMinutes { get; set; } = 15; - public bool UseSystemXamarinIOSMac { get; set; } public int Verbosity { get; set; } public XmlResultJargon XmlJargon { get; set; } = XmlResultJargon.NUnitV3; @@ -198,8 +197,6 @@ bool IsVariableSet (string variable) public List TestProjects { get; } = new (); - readonly bool useSystemXamarinIOSMac; // if the system XI/XM should be used, or the locally build XI/XM. - public bool INCLUDE_IOS { get; } public bool INCLUDE_TVOS { get; } public bool INCLUDE_MAC { get; } @@ -251,9 +248,6 @@ public Harness (IResultParser resultParser, HarnessAction action, HarnessConfigu PeriodicCommandInterval = configuration.PeriodicCommandInterval; target = configuration.Target; Timeout = configuration.TimeoutInMinutes; - useSystemXamarinIOSMac = configuration.UseSystemXamarinIOSMac; - if (!string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("TESTS_USE_SYSTEM"))) - useSystemXamarinIOSMac = true; Verbosity = configuration.Verbosity; XmlJargon = configuration.XmlJargon; @@ -575,7 +569,7 @@ Dictionary ParseConfigFiles () IEnumerable GetConfigFiles () { - return FindConfigFiles (useSystemXamarinIOSMac ? "test-system.config" : "test.config") + return FindConfigFiles ("test.config") .Concat (FindConfigFiles ("configure.inc")) .Concat (FindConfigFiles ("Make.config")) .Concat (FindConfigFiles ("Make.config.local")) diff --git a/tests/xharness/Program.cs b/tests/xharness/Program.cs index c7276c9422a3..45e9148b1618 100644 --- a/tests/xharness/Program.cs +++ b/tests/xharness/Program.cs @@ -38,7 +38,6 @@ public static int Main (string [] args) var os = new OptionSet () { { "h|?|help", "Displays the help", (v) => showHelp!.Invoke () }, { "v|verbose", "Show verbose output", (v) => configuration.Verbosity++ }, - { "use-system:", "Use the system version of Xamarin.iOS/Xamarin.Mac or the locally build version. Default: the locally build version.", (v) => configuration.UseSystemXamarinIOSMac = v == "1" || v == "true" || string.IsNullOrEmpty (v) }, { "rootdir=", "The root directory for the tests.", (v) => HarnessConfiguration.RootDirectory = v }, { "sdkroot=", "Where Xcode is", (v) => configuration.SdkRoot = v }, { "target=", "Where to run the project ([ios|tvos]-[device|simulator).", (v) => configuration.Target = v.ParseAsAppRunnerTarget () }, diff --git a/tests/xtro-sharpie/Makefile b/tests/xtro-sharpie/Makefile index 26d0e6debd16..16d976ebf923 100644 --- a/tests/xtro-sharpie/Makefile +++ b/tests/xtro-sharpie/Makefile @@ -36,11 +36,7 @@ $(XTRO_SANITY): $(wildcard xtro-sanity/*.cs) $(wildcard xtro-sanity/*.csproj) $( $(Q_GEN) unset MSBUILD_EXE_PATH && $(DOTNET) build xtro-sanity/xtro-sanity.csproj /bl:xtro-sanity.binlog $(DOTNET_BUILD_VERBOSITY) define DotNetAssemblyPath -ifdef TESTS_USE_SYSTEM -X$(2)_DOTNET ?= $(DOTNET_DIR)/packs/$($(2)_NUGET_RUNTIME_MANAGED_NAME)/$($(2)_WORKLOAD_VERSION)/runtimes/$(DOTNET_$(2)_RUNTIME_IDENTIFIERS_NO_ARCH)/lib/$(DOTNET_TFM)/$(DOTNET_$(2)_ASSEMBLY_NAME).dll -else X$(2)_DOTNET ?= $(DOTNET_DESTDIR)/$($(2)_NUGET_RUNTIME_MANAGED_NAME)/runtimes/$(DOTNET_$(2)_RUNTIME_IDENTIFIERS_NO_ARCH)/lib/$(DOTNET_TFM)/$(DOTNET_$(2)_ASSEMBLY_NAME).dll -endif endef $(foreach platform,$(XTRO_DOTNET_PLATFORMS),$(eval $(call DotNetAssemblyPath,$(platform),$(shell echo $(platform) | tr a-z A-Z)))) diff --git a/tools/devops/automation/scripts/run-generator-tests-on-windows.ps1 b/tools/devops/automation/scripts/run-generator-tests-on-windows.ps1 index 6e1692564e3f..fc0db1565ed3 100644 --- a/tools/devops/automation/scripts/run-generator-tests-on-windows.ps1 +++ b/tools/devops/automation/scripts/run-generator-tests-on-windows.ps1 @@ -14,7 +14,6 @@ if ($Env:SYSTEM_DEFAULTWORKINGDIRECTORY.EndsWith($Env:BUILD_REPOSITORY_TITLE)) { # Set a few variables $Env:DOTNET = "$Env:BUILD_SOURCESDIRECTORY\$Env:BUILD_REPOSITORY_TITLE\tests\dotnet\Windows\bin\dotnet\dotnet.exe" $Env:DOTNET_DIR = "$Env:BUILD_SOURCESDIRECTORY\$Env:BUILD_REPOSITORY_TITLE\tests\dotnet\Windows\bin\dotnet\" -$Env:TESTS_USE_SYSTEM = "1" # Set Xcode version info so BGen tests can determine preview API diagnostic suppression $Env:XCODE_VERSION = $Env:CONFIGURATION_XCODE_VERSION diff --git a/tools/devops/automation/templates/tests/run-tests.yml b/tools/devops/automation/templates/tests/run-tests.yml index 483f3afbb30c..9d1662e16373 100644 --- a/tools/devops/automation/templates/tests/run-tests.yml +++ b/tools/devops/automation/templates/tests/run-tests.yml @@ -52,11 +52,6 @@ steps: TESTS_PLATFORM: ${{ parameters.testPlatform }} LABEL_WITH_PLATFORM: ${{ parameters.labelWithPlatform }} -- pwsh: | - Write-Host "##vso[task.setvariable variable=TESTS_USE_SYSTEM]true" - displayName: Set SDK destination dirs - - # remove any old processes that might have been left behind. - pwsh: | Import-Module $Env:SYSTEM_DEFAULTWORKINGDIRECTORY/$Env:BUILD_REPOSITORY_TITLE/tools/devops/automation/scripts/MaciosCI.psd1