From b0cd6df2f5e47bb59c4cdf9c0754242333842e90 Mon Sep 17 00:00:00 2001 From: dotnet-maestro <@dotnet-maestro> Date: Fri, 31 May 2019 05:50:58 +0000 Subject: [PATCH 01/29] Update dependencies from https://github.com/dotnet/sdk build 20190530.4 - Microsoft.NET.Sdk - 3.0.100-preview6.19280.4 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 67d5d74f4367..13598ad2ab96 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -50,9 +50,9 @@ https://github.com/dotnet/standard 2c94a70248b2c4379ceffbade085f8d7eca4fee0 - + https://github.com/dotnet/sdk - d6749cfae26412c188e26c247b15919afccef127 + cda3914e2da64cf48029ac06dc043e039d1d1ee9 https://github.com/dotnet/cli diff --git a/eng/Versions.props b/eng/Versions.props index 48c334627657..ade34fef98aa 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -44,7 +44,7 @@ - 3.0.100-preview6.19279.4 + 3.0.100-preview6.19280.4 3.0.0-preview6-27730-01 From de225255ac239d97b5a6765db491995e7314c7ff Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 15 Apr 2019 11:24:42 -0700 Subject: [PATCH 02/29] Run tests from dotnet/sdk --- Microsoft.DotNet.Cli.sln | 7 +++ test/SdkTests/SdkTests.csproj | 115 ++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 test/SdkTests/SdkTests.csproj diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index ed4f517c97f8..a5f56ff7992c 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -19,6 +19,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SdkResolver", "src\SdkResol EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Dotnet.Sdk.Internal", "src\Microsoft.Dotnet.Sdk.Internal\Microsoft.Dotnet.Sdk.Internal.csproj", "{73F07908-981B-41BB-B9BD-F3420274A6F7}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SdkTests", "test\SdkTests\SdkTests.csproj", "{CB1EE94E-CB83-4071-9DD0-9929AE2B7282}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -49,6 +51,10 @@ Global {73F07908-981B-41BB-B9BD-F3420274A6F7}.Debug|Any CPU.Build.0 = Debug|Any CPU {73F07908-981B-41BB-B9BD-F3420274A6F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {73F07908-981B-41BB-B9BD-F3420274A6F7}.Release|Any CPU.Build.0 = Release|Any CPU + {CB1EE94E-CB83-4071-9DD0-9929AE2B7282}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB1EE94E-CB83-4071-9DD0-9929AE2B7282}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB1EE94E-CB83-4071-9DD0-9929AE2B7282}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB1EE94E-CB83-4071-9DD0-9929AE2B7282}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -59,6 +65,7 @@ Global {53AF2D01-B69F-4CD0-86A7-8FD95967D23C} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {78E15EC1-7732-41E3-8591-934E9F583254} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {7EE15292-2CAD-44FA-8A1F-BAC4688A49E0} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} + {CB1EE94E-CB83-4071-9DD0-9929AE2B7282} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5} diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj new file mode 100644 index 000000000000..41f55ef81dd6 --- /dev/null +++ b/test/SdkTests/SdkTests.csproj @@ -0,0 +1,115 @@ + + + + false + false + Library + false + false + false + true + true + true + + + + + + $(MSBuildToolsPath)\Microsoft.CSharp.targets + + false + + false + $(CoreSdkTargetFramework) + + + + $(ArtifactsBinDir)redist\$(Configuration)\dotnet\ + + + + + + + + + + + + + + + + + + + $(ArtifactsTmpDir)$(ToolCommandName)\ + + + + + + + + + + + + + + + $(ArtifactsTestResultsDir)$(TestProjectName).xml + $(ArtifactsTestResultsDir)$(TestProjectName).html + $(ArtifactsLogDir)$(TestProjectName).log + + -noautoreporters -noRepoInference + $(TestArgs) -dotnetPath $(RedistLayoutPath)\dotnet + $(TestArgs) -xml "$(ResultsXmlPath)" + $(TestArgs) -html "$(ResultsHtmlPath)" $(TestRunnerAdditionalArguments) + $(TestArgs) > $(ResultsStdOutPath) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From c534fcad64ef833cb0711acb6a49861d2940459f Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 15 Apr 2019 11:22:36 -0700 Subject: [PATCH 03/29] Isolate SDK tests from repo Directory.Build files --- test/SdkTests/SdkTests.csproj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 41f55ef81dd6..03b087587156 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -38,6 +38,14 @@ + + + + Date: Mon, 15 Apr 2019 14:53:56 -0700 Subject: [PATCH 04/29] Unset DOTNET environment variables for tests --- test/SdkTests/SdkTests.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 03b087587156..6ed49df3063f 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -85,7 +85,8 @@ + IgnoreStandardErrorWarningFormat="true" + EnvironmentVariables="DOTNET_HOST_PATH=;DOTNET_INSTALLDIR="/> From 380a828e99ea3eff478ed0ea354a4e72210d0600 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 17 Apr 2019 14:26:45 -0700 Subject: [PATCH 05/29] Install previous runtimes for SDK tests --- test/SdkTests/SdkTests.csproj | 49 +++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 6ed49df3063f..9f5bf3479edd 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -25,6 +25,7 @@ $(ArtifactsBinDir)redist\$(Configuration)\dotnet\ + $(ArtifactsBinDir)redist\$(Configuration)\dotnet-with-previous-runtimes\ @@ -35,9 +36,53 @@ + + + + + - + + + + + $(DotnetToTestPath)%(RecursiveDir)%(Filename)%(Extension) + + + + + + + + + + $(DotnetToTestPath)shared\Microsoft.NETCore.App\$(RuntimeVersionToInstall) + + + powershell -NoLogo -NoProfile -ExecutionPolicy ByPass + $(InstallRuntimeCommand) $(_DotNetRoot)dotnet-install.ps1 + $(InstallRuntimeCommand) -Version $(RuntimeVersionToInstall) + $(InstallRuntimeCommand) -InstallDir $(DotnetToTestPath) + $(InstallRuntimeCommand) -Runtime "dotnet" + + + $(_DotNetRoot)dotnet-install.sh + $(InstallRuntimeCommand) --version $(RuntimeVersionToInstall) + $(InstallRuntimeCommand) --install_dir $(DotnetToTestPath) + $(InstallRuntimeCommand) --runtime "dotnet" + + + + + + @@ -77,7 +122,7 @@ $(ArtifactsLogDir)$(TestProjectName).log -noautoreporters -noRepoInference - $(TestArgs) -dotnetPath $(RedistLayoutPath)\dotnet + $(TestArgs) -dotnetPath $(DotnetToTestPath)\dotnet $(TestArgs) -xml "$(ResultsXmlPath)" $(TestArgs) -html "$(ResultsHtmlPath)" $(TestRunnerAdditionalArguments) $(TestArgs) > $(ResultsStdOutPath) From 891a63e9cc3c2be3bbfe778e8fb23dd1141f508f Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 17 Apr 2019 14:30:42 -0700 Subject: [PATCH 06/29] Simplify global properties passed to run SDK tests --- test/SdkTests/SdkTests.csproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 9f5bf3479edd..cf53b9b7b613 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -93,12 +93,14 @@ + testSdk$(ToolTestName) + Microsoft.NET.$(ToolTestName).Tests $(ArtifactsTmpDir)$(ToolCommandName)\ From 0f81d8a67d43cefaf28b2d67f5cb10189f64223c Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 18 Apr 2019 00:28:39 -0700 Subject: [PATCH 07/29] Try UseCommandProcessor=false when calling dotnet-install script --- test/SdkTests/SdkTests.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index cf53b9b7b613..77abee82d689 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -79,6 +79,7 @@ From a19b31a1e9af9cd814ea00226b46bfa5c905c5c4 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 18 Apr 2019 15:34:33 -0700 Subject: [PATCH 08/29] Use bash to run dotnet-install.sh --- test/SdkTests/SdkTests.csproj | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 77abee82d689..94e99ca95056 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -66,15 +66,16 @@ powershell -NoLogo -NoProfile -ExecutionPolicy ByPass - $(InstallRuntimeCommand) $(_DotNetRoot)dotnet-install.ps1 + $(InstallRuntimeCommand) "$(_DotNetRoot)dotnet-install.ps1" $(InstallRuntimeCommand) -Version $(RuntimeVersionToInstall) - $(InstallRuntimeCommand) -InstallDir $(DotnetToTestPath) + $(InstallRuntimeCommand) -InstallDir "$(DotnetToTestPath)" $(InstallRuntimeCommand) -Runtime "dotnet" - $(_DotNetRoot)dotnet-install.sh + /bin/bash + $(InstallRuntimeCommand) "$(_DotNetRoot)dotnet-install.sh" $(InstallRuntimeCommand) --version $(RuntimeVersionToInstall) - $(InstallRuntimeCommand) --install_dir $(DotnetToTestPath) + $(InstallRuntimeCommand) --install_dir "$(DotnetToTestPath)" $(InstallRuntimeCommand) --runtime "dotnet" From c9655ad17231b308445df603b72d28531bae6146 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 18 Apr 2019 16:35:47 -0700 Subject: [PATCH 09/29] Fix --install-dir parameter to dotnet-install.sh --- test/SdkTests/SdkTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 94e99ca95056..94ad7aad7d20 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -75,7 +75,7 @@ /bin/bash $(InstallRuntimeCommand) "$(_DotNetRoot)dotnet-install.sh" $(InstallRuntimeCommand) --version $(RuntimeVersionToInstall) - $(InstallRuntimeCommand) --install_dir "$(DotnetToTestPath)" + $(InstallRuntimeCommand) --install-dir "$(DotnetToTestPath)" $(InstallRuntimeCommand) --runtime "dotnet" From bbd97e9e336b8b76f055f57607f5ff24a64ce34e Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 18 Apr 2019 16:40:46 -0700 Subject: [PATCH 10/29] Unquote parameter --- test/SdkTests/SdkTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 94ad7aad7d20..9802acfbc08d 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -68,7 +68,7 @@ powershell -NoLogo -NoProfile -ExecutionPolicy ByPass $(InstallRuntimeCommand) "$(_DotNetRoot)dotnet-install.ps1" $(InstallRuntimeCommand) -Version $(RuntimeVersionToInstall) - $(InstallRuntimeCommand) -InstallDir "$(DotnetToTestPath)" + $(InstallRuntimeCommand) -InstallDir $(DotnetToTestPath) $(InstallRuntimeCommand) -Runtime "dotnet" From edbdcee509088a90dcd04eeec66aaddd0bb43248 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 18 Apr 2019 16:57:23 -0700 Subject: [PATCH 11/29] Use command processor --- test/SdkTests/SdkTests.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 9802acfbc08d..eb74ff0eaca7 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -80,7 +80,6 @@ From a494a1a84bf340cbd4b28dac9a38a2e0e4dafc98 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 18 Apr 2019 17:31:11 -0700 Subject: [PATCH 12/29] Don't parse dotnet-install output for errors --- test/SdkTests/SdkTests.csproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index eb74ff0eaca7..8244e2468c94 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -80,7 +80,9 @@ + Condition="!Exists($(RuntimeTargetDirectory))" + IgnoreStandardErrorWarningFormat="true" + /> From 5d4d781dcc1b155b5bb17562ecab81efea6c35b5 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 23 Apr 2019 08:54:02 -0700 Subject: [PATCH 13/29] Unset environment variables for running SDK tests --- test/SdkTests/SdkTests.csproj | 36 +++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 8244e2468c94..aea5406269d0 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -93,6 +93,12 @@ DestinationFolder="$(TEMP)\dotnetSdkTests" SkipUnchangedFiles="true" /> + + + + + + - + $(MicrosoftNETSdkPackageVersion) + https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + + dotnet tool install --local $(ToolCommandName) + + $(InstallToolCommand) --version $(SdkTestPackageVersion) + $(InstallToolCommand) --add-source $(SdkTestPackageFeed) + + + + + $(TestArgs) > $(ResultsStdOutPath) - + $(ToolRunPrefix)set MSBuildSDKsPath= && + $(ToolRunPrefix)set DOTNET_HOST_PATH= && + $(ToolRunPrefix)set DOTNET_INSTALLDIR= && + + + $(ToolRunPrefix)unset MSBuildSDKsPath && + $(ToolRunPrefix)unset DOTNET_HOST_PATH && + $(ToolRunPrefix)unset DOTNET_INSTALLDIR && + + + + IgnoreStandardErrorWarningFormat="true" /> From 22ad1f424203584f69c4d9dc5cdf45039671b308 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 23 Apr 2019 13:23:30 -0700 Subject: [PATCH 14/29] Continue build if there are test errors --- test/SdkTests/SdkTests.csproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index aea5406269d0..70eed886541e 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -103,7 +103,9 @@ + BuildInParallel="true" + ContinueOnError="true" + /> From e7c4d3e6ec9995eed1a08ed37658db235ee4d298 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 23 Apr 2019 15:47:03 -0700 Subject: [PATCH 15/29] Set test execution directory for SDK tests --- test/SdkTests/SdkTests.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 70eed886541e..619ced422d78 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -87,10 +87,9 @@ - + @@ -148,6 +147,7 @@ -noautoreporters -noRepoInference $(TestArgs) -dotnetPath $(DotnetToTestPath)\dotnet + $(TestArgs) -testExecutionDirectory $(ArtifactsTmpDir)/dotnetSdkTests $(TestArgs) -xml "$(ResultsXmlPath)" $(TestArgs) -html "$(ResultsHtmlPath)" $(TestRunnerAdditionalArguments) $(TestArgs) > $(ResultsStdOutPath) From 7e7d65d9f91863088d4f8b69340dcb72c3ebaa7d Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 23 Apr 2019 15:48:11 -0700 Subject: [PATCH 16/29] Support setting "partition" for arcade to avoid conflicts of .dotnet and artifacts folders --- .gitignore | 2 ++ eng/common/tools.ps1 | 9 +++++++++ eng/common/tools.sh | 9 ++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 23fe40877441..2ce687bb17a1 100644 --- a/.gitignore +++ b/.gitignore @@ -95,8 +95,10 @@ dlldata.c # Build artifacts artifacts/ +artifacts-*/ bin/ .dotnet/ +.dotnet-*/ *_i.c *_p.c diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 9ca177b82a34..6b014701fe03 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -128,7 +128,12 @@ function InitializeDotNetCli([bool]$install) { if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) { $dotnetRoot = $env:DOTNET_INSTALL_DIR } else { + $dotnetRoot = Join-Path $RepoRoot ".dotnet" + if ($env:ARCADE_PARTITION -ne $null) + { + $dotnetRoot = Join-Path $RepoRoot ".dotnet-$env:ARCADE_PARTITION" + } if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) { if ($install) { @@ -553,6 +558,10 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) { $RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..") $EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..") $ArtifactsDir = Join-Path $RepoRoot "artifacts" +if ($env:ARCADE_PARTITION -ne $null) +{ + $ArtifactsDir = Join-Path $RepoRoot "artifacts-$env:ARCADE_PARTITION" +} $ToolsetDir = Join-Path $ArtifactsDir "toolset" $ToolsDir = Join-Path $RepoRoot ".tools" $LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration diff --git a/eng/common/tools.sh b/eng/common/tools.sh index df3eb8bce075..ee196afb5980 100644 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -119,7 +119,9 @@ function InitializeDotNetCli { dotnet_root="$DOTNET_INSTALL_DIR" else dotnet_root="$repo_root/.dotnet" - + if [[ -n "${ARCADE_PARTITION:-}" ]]; then + dotnet_root="$repo_root/.dotnet-$ARCADE_PARTITION" + fi export DOTNET_INSTALL_DIR="$dotnet_root" if [[ ! -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then @@ -336,6 +338,11 @@ _script_dir=`dirname "$_ResolvePath"` eng_root=`cd -P "$_script_dir/.." && pwd` repo_root=`cd -P "$_script_dir/../.." && pwd` artifacts_dir="$repo_root/artifacts" +if [[ -n "${ARCADE_PARTITION:-}" ]]; then + artifacts_dir="$repo_root/artifacts-$ARCADE_PARTITION" + export ArtifactsDir="$artifacts_dir/" +fi + toolset_dir="$artifacts_dir/toolset" tools_dir="$repo_root/.tools" log_dir="$artifacts_dir/log/$configuration" From 7490d121a47fe89a2cac15b9e62e6014e3cf9487 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 23 Apr 2019 16:53:04 -0700 Subject: [PATCH 17/29] Avoid trying to install 1.x runtimes when not supported --- test/SdkTests/SdkTests.csproj | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 619ced422d78..0eebdcfd0c74 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -36,14 +36,34 @@ - - - - - - + + + true + + + + + + + + false + + + + + + + + + + + + + + From 9e43e8ad3f892b8705a2c91945ef55cb52160580 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 15 May 2019 18:09:01 -0700 Subject: [PATCH 18/29] Add TestConfig with SDK tests to skip, and other fixes for SDK tests --- test/SdkTests/SdkTests.csproj | 29 ++++++++++++- test/SdkTests/TestConfig.xml | 78 +++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 test/SdkTests/TestConfig.xml diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 0eebdcfd0c74..da887f58dbee 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -26,6 +26,7 @@ $(ArtifactsBinDir)redist\$(Configuration)\dotnet\ $(ArtifactsBinDir)redist\$(Configuration)\dotnet-with-previous-runtimes\ + $([MSBuild]::NormalizePath($(ArtifactsTmpDir), 'dotnetSdkTests')) @@ -109,10 +110,33 @@ + + + $(TestExecutionDirectory)\NuGet.config + + + + + + + + + + + + ]]> + + + + + @@ -167,7 +191,8 @@ -noautoreporters -noRepoInference $(TestArgs) -dotnetPath $(DotnetToTestPath)\dotnet - $(TestArgs) -testExecutionDirectory $(ArtifactsTmpDir)/dotnetSdkTests + $(TestArgs) -testExecutionDirectory $(TestExecutionDirectory) + $(TestArgs) -testConfigFile "$(MSBuildThisFileDirectory)TestConfig.xml" $(TestArgs) -xml "$(ResultsXmlPath)" $(TestArgs) -html "$(ResultsHtmlPath)" $(TestRunnerAdditionalArguments) $(TestArgs) > $(ResultsStdOutPath) diff --git a/test/SdkTests/TestConfig.xml b/test/SdkTests/TestConfig.xml new file mode 100644 index 000000000000..6eaf76fab2d1 --- /dev/null +++ b/test/SdkTests/TestConfig.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 2eefd807d4c62365ba217280584828d3d78cbad3 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 16 May 2019 16:22:51 -0700 Subject: [PATCH 19/29] Add build environment script (with partition support) --- eng/core-sdk-build-env.sh | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 eng/core-sdk-build-env.sh diff --git a/eng/core-sdk-build-env.sh b/eng/core-sdk-build-env.sh new file mode 100644 index 000000000000..6b3974e463a4 --- /dev/null +++ b/eng/core-sdk-build-env.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. +# + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done + +REPO_ROOT="$( cd -P "$( dirname "$SOURCE" )/../" && pwd )" + +arcade_partition= + +while [[ $# > 0 ]]; do + opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" + case "$opt" in + -partition) + arcade_partition=$2 + shift + ;; + esac + + shift +done + +export ARCADE_PARTITION=$arcade_partition + +if [[ ! -z "$arcade_partition" ]]; then + arcade_partition_suffix="-$arcade_partition" +fi + +export PATH=$REPO_ROOT/.dotnet$arcade_partition_suffix:$PATH +export DOTNET_INSTALL_DIR=$REPO_ROOT/.dotnet$arcade_partition_suffix +export ArtifactsDir=$REPO_ROOT/artifacts$arcade_partition_suffix/ + +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 +export DOTNET_MULTILEVEL_LOOKUP=0 \ No newline at end of file From 78aab6631e3ff50c07c926f2c0c6e6baba958351 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 16 May 2019 18:24:45 -0700 Subject: [PATCH 20/29] Install updated patch for sdk tests, skip additional test --- test/SdkTests/SdkTests.csproj | 2 +- test/SdkTests/TestConfig.xml | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index da887f58dbee..774dc6c48d23 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -59,7 +59,7 @@ - + diff --git a/test/SdkTests/TestConfig.xml b/test/SdkTests/TestConfig.xml index 6eaf76fab2d1..e0066badaa92 100644 --- a/test/SdkTests/TestConfig.xml +++ b/test/SdkTests/TestConfig.xml @@ -29,6 +29,11 @@ Issue="https://github.com/dotnet/sdk/pull/3214" Reason="Code flow needed"/> + + - \ No newline at end of file + From 66aaea7df131bdc987b93b3988b4842b890a9139 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 16 May 2019 22:41:37 -0700 Subject: [PATCH 21/29] Disable installing 1x runtimes on OS's where it's not available --- test/SdkTests/SdkTests.csproj | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 774dc6c48d23..311b243ddd0a 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -53,6 +53,23 @@ false + + false + + + + false + + + + false + + + + + false + + From db946ebe36d2e43d740af2e528f3c7b0a6f724c6 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 17 May 2019 15:20:51 -0700 Subject: [PATCH 22/29] Skip additional SDK tests --- test/SdkTests/TestConfig.xml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/test/SdkTests/TestConfig.xml b/test/SdkTests/TestConfig.xml index e0066badaa92..6b3aec8bc73e 100644 --- a/test/SdkTests/TestConfig.xml +++ b/test/SdkTests/TestConfig.xml @@ -55,7 +55,7 @@ Issue="" Reason="Test doesn't work with newer RIDs"/> - @@ -70,14 +70,24 @@ Issue="" Reason="Needs .NET Core 1.1"/> - - - + + + + + + + From 6bbd4979a1119f96ec04ff43374ea241b027a4ff Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 17 May 2019 15:30:54 -0700 Subject: [PATCH 23/29] Update dockerrun.ps1 to use ARCADE_PARTITION --- eng/dockerrun.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/dockerrun.ps1 b/eng/dockerrun.ps1 index 48a79ffd9288..17eae39b45e9 100644 --- a/eng/dockerrun.ps1 +++ b/eng/dockerrun.ps1 @@ -55,7 +55,6 @@ docker run $interactiveFlag -t --rm --sig-proxy=true ` -e PB_PACKAGEVERSIONPROPSURL ` -e PB_PUBLISHBLOBFEEDURL ` -e EXTERNALRESTORESOURCES ` - -e ARCADE_DOTNET_DIR="/opt/code/artifacts/docker/${dockerImageName}/.dotnet" ` - -e ARCADE_ARTIFACTS_DIR="/opt/code/artifacts/docker/${dockerImageName}/" ` + -e ARCADE_PARTITION="${dockerImageName}" ` $dockerContainerTag ` /opt/code/run-build.sh @additionalArgs \ No newline at end of file From 2f4c5d1509c76f76f21a1e4db2b06e943593b66b Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Sat, 18 May 2019 21:59:29 -0700 Subject: [PATCH 24/29] Always gather logs --- eng/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/build.yml b/eng/build.yml index 92add5df4ebb..d94ed6667a9d 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -117,7 +117,7 @@ phases: TestResults/$(_BuildConfig)/**/* TargetFolder: '$(Build.ArtifactStagingDirectory)' continueOnError: true - condition: not(succeeded()) + condition: always() - task: PublishBuildArtifacts@1 displayName: Publish Logs to VSTS @@ -126,7 +126,7 @@ phases: ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' publishLocation: Container continueOnError: true - condition: not(succeeded()) + condition: always() - ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: CopyFiles@2 From 64ac44f75991c1f44d5a3279622703442a0e80f2 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 20 May 2019 12:04:08 -0700 Subject: [PATCH 25/29] Capture STDERR in SDK test logs --- test/SdkTests/SdkTests.csproj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 311b243ddd0a..1df0697e78d6 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -212,7 +212,7 @@ $(TestArgs) -testConfigFile "$(MSBuildThisFileDirectory)TestConfig.xml" $(TestArgs) -xml "$(ResultsXmlPath)" $(TestArgs) -html "$(ResultsHtmlPath)" $(TestRunnerAdditionalArguments) - $(TestArgs) > $(ResultsStdOutPath) + $(TestArgs) > $(ResultsStdOutPath) 2>&1 @@ -227,8 +227,7 @@ + WorkingDirectory="$(TestLocalToolFolder)" /> From 733d56972bb8fc6fe11c796f3bc45e42f6a6b1ea Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 20 May 2019 14:58:42 -0700 Subject: [PATCH 26/29] Clean workspace --- eng/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/build.yml b/eng/build.yml index d94ed6667a9d..227d8cf60dc6 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -26,6 +26,8 @@ phases: pool: ${{ parameters.pool }} ${{ if ne(parameters.strategy, '') }}: strategy: ${{ parameters.strategy }} + workspace: + clean: all variables: - _AgentOSName: ${{ parameters.agentOs }} From 38c953c374b825bba1697dcc33537b08cec336b7 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 20 May 2019 16:21:14 -0700 Subject: [PATCH 27/29] Don't batch SDK test projects or continue on error --- test/SdkTests/SdkTests.csproj | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 1df0697e78d6..6d3a6fcea523 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -159,12 +159,16 @@ + + + + ToolTestName=%(SdkTest.Identity) + + - From 3e4671fa67551138112fc18ba6bc49b3fa6a713e Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 30 May 2019 09:56:24 -0700 Subject: [PATCH 28/29] Install 1x runtimes on Windows --- test/SdkTests/SdkTests.csproj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 6d3a6fcea523..57c3a32f164d 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -49,6 +49,11 @@ + + + Windows + + false From 14ef1b67299414d1cb2453d0ba057df703f8339a Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 30 May 2019 15:38:42 -0700 Subject: [PATCH 29/29] Install runtime for SDK tests with correct architecture --- test/SdkTests/SdkTests.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 57c3a32f164d..dd7a0225343b 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -113,6 +113,7 @@ $(InstallRuntimeCommand) -Version $(RuntimeVersionToInstall) $(InstallRuntimeCommand) -InstallDir $(DotnetToTestPath) $(InstallRuntimeCommand) -Runtime "dotnet" + $(InstallRuntimeCommand) -Architecture "$(Architecture)" /bin/bash @@ -120,6 +121,7 @@ $(InstallRuntimeCommand) --version $(RuntimeVersionToInstall) $(InstallRuntimeCommand) --install-dir "$(DotnetToTestPath)" $(InstallRuntimeCommand) --runtime "dotnet" + $(InstallRuntimeCommand) --architecture "$(Architecture)"