From 99eec409837fb1544afb107ad3ba55cf8ecaa0a6 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 1 Jul 2020 14:03:17 -0700 Subject: [PATCH 01/21] Use cli support --- eng/helix/helix.proj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eng/helix/helix.proj b/eng/helix/helix.proj index 250b2fb9b2c8..971a22225774 100644 --- a/eng/helix/helix.proj +++ b/eng/helix/helix.proj @@ -22,7 +22,10 @@ true 2 $(HelixApiAccessToken) - + true + sdk + $(NETCoreSdkVersion) + bin\ $(BaseOutputPath)$(Configuration)\ From 89f4e78e8ca29f305f9a84b3c8893e8e91f9a39e Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 1 Jul 2020 14:11:06 -0700 Subject: [PATCH 02/21] Update runtests.cmd --- eng/helix/content/runtests.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/helix/content/runtests.cmd b/eng/helix/content/runtests.cmd index c1b27b1c890c..19068e6c1d46 100644 --- a/eng/helix/content/runtests.cmd +++ b/eng/helix/content/runtests.cmd @@ -17,7 +17,7 @@ shift set $helixTimeout=%9 set DOTNET_HOME=%HELIX_CORRELATION_PAYLOAD%\sdk -set DOTNET_ROOT=%DOTNET_HOME%\%$arch% +set DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\dotnet set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 set DOTNET_MULTILEVEL_LOOKUP=0 set DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\home From 7fe916a0d844a4ba712271d974420c48e3b7a383 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 1 Jul 2020 14:11:21 -0700 Subject: [PATCH 03/21] Update InstallDotNet.ps1 --- eng/helix/content/InstallDotNet.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eng/helix/content/InstallDotNet.ps1 b/eng/helix/content/InstallDotNet.ps1 index 7e8786643355..1d1df0b431af 100644 --- a/eng/helix/content/InstallDotNet.ps1 +++ b/eng/helix/content/InstallDotNet.ps1 @@ -28,8 +28,6 @@ param( & $PSScriptRoot\Download.ps1 "https://dot.net/v1/dotnet-install.ps1" $PSScriptRoot\dotnet-install.ps1 Write-Host "Download of dotnet-install.ps1 complete..." -Write-Host "Installing SDK...& $PSScriptRoot\dotnet-install.ps1 -Architecture $arch -Version $sdkVersion -InstallDir $installDir" -Invoke-Expression "& $PSScriptRoot\dotnet-install.ps1 -Architecture $arch -Version $sdkVersion -InstallDir $installDir" Write-Host "Installing Runtime...& $PSScriptRoot\dotnet-install.ps1 -Architecture $arch -Runtime dotnet -Version $runtimeVersion -InstallDir $installDir" Invoke-Expression "& $PSScriptRoot\dotnet-install.ps1 -Architecture $arch -Runtime dotnet -Version $runtimeVersion -InstallDir $installDir" -Write-Host "InstallDotNet.ps1 complete..." \ No newline at end of file +Write-Host "InstallDotNet.ps1 complete..." From 8a17c8322f8e01df49e75e3e31eebe95bdee45cf Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 1 Jul 2020 14:12:23 -0700 Subject: [PATCH 04/21] Update runtests.sh --- eng/helix/content/runtests.sh | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/eng/helix/content/runtests.sh b/eng/helix/content/runtests.sh index a1bf93270604..41d3653912a2 100644 --- a/eng/helix/content/runtests.sh +++ b/eng/helix/content/runtests.sh @@ -47,20 +47,6 @@ fi # Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs) chmod +x "dotnet-install.sh"; sync -./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT" -if [ $? -ne 0 ]; then - sdk_retries=3 - while [ $sdk_retries -gt 0 ]; do - ./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT" - if [ $? -ne 0 ]; then - let sdk_retries=sdk_retries-1 - echo -e "${YELLOW}Failed to install .NET Core SDK $version. Retries left: $sdk_retries.${RESET}" - else - sdk_retries=0 - fi - done -fi - ./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT" if [ $? -ne 0 ]; then runtime_retries=3 From bd6178894557432bdc468510fda0235c6b270cb8 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 1 Jul 2020 16:30:25 -0700 Subject: [PATCH 05/21] Update helix.proj --- eng/helix/helix.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/helix/helix.proj b/eng/helix/helix.proj index 971a22225774..79901b623028 100644 --- a/eng/helix/helix.proj +++ b/eng/helix/helix.proj @@ -24,7 +24,7 @@ $(HelixApiAccessToken) true sdk - $(NETCoreSdkVersion) + 5.0.100-preview.6.20310.4 bin\ From 8069366b6016c63896572823e652f05a12782fa8 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 1 Jul 2020 16:31:46 -0700 Subject: [PATCH 06/21] Update runtests.sh --- eng/helix/content/runtests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/helix/content/runtests.sh b/eng/helix/content/runtests.sh index 41d3653912a2..3fc05bb640c1 100644 --- a/eng/helix/content/runtests.sh +++ b/eng/helix/content/runtests.sh @@ -11,7 +11,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Ensures every invocation of dotnet apps uses the same dotnet.exe # Add $random to path to ensure tests don't expect dotnet to be in a particular path -export DOTNET_ROOT="$DIR/.dotnet$RANDOM" +export DOTNET_ROOT="$HELIX_CORRELATION_PAYLOAD/dotnet" # Ensure dotnet comes first on PATH export PATH="$DOTNET_ROOT:$PATH:$DIR/node/bin" From e672b5b8bf5ffad6ceccc9af708d4905c8971b87 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 2 Jul 2020 11:47:30 -0700 Subject: [PATCH 07/21] Update ci.yml --- .azure/pipelines/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 62a8e30dc958..c028c9335334 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -612,7 +612,7 @@ stages: - script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj displayName: Restore interop projects - script: ./build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildNative -projects eng\helix\helix.proj - /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true + /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:DotNetCliVersion=$(NETCoreSdkVersion) /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log displayName: Run build.cmd helix target env: From f8803f4dd470b2f1b14fa75be900c7ccea2de479 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 2 Jul 2020 11:48:11 -0700 Subject: [PATCH 08/21] Update helix.proj --- eng/helix/helix.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/helix/helix.proj b/eng/helix/helix.proj index 79901b623028..971a22225774 100644 --- a/eng/helix/helix.proj +++ b/eng/helix/helix.proj @@ -24,7 +24,7 @@ $(HelixApiAccessToken) true sdk - 5.0.100-preview.6.20310.4 + $(NETCoreSdkVersion) bin\ From 32c8bd67e8e6ab0afd9b6377c639bacd71be4288 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 2 Jul 2020 16:11:38 -0700 Subject: [PATCH 09/21] Update helix.proj --- eng/helix/helix.proj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/helix/helix.proj b/eng/helix/helix.proj index 971a22225774..44b32f32190f 100644 --- a/eng/helix/helix.proj +++ b/eng/helix/helix.proj @@ -1,5 +1,6 @@ - + + @@ -7,6 +8,10 @@ This must be reset in order for Build.props to evaluate a list of projects to be tested on Helix. --> + + + $(NoWarn);MSB4011 + From c30bcf676b7cc238b128e92e5764383de4184a28 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Tue, 7 Jul 2020 00:29:49 -0700 Subject: [PATCH 17/21] Remove sdk version arg --- eng/targets/Helix.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/targets/Helix.targets b/eng/targets/Helix.targets index 0743963a02a9..ad7b35da23b8 100644 --- a/eng/targets/Helix.targets +++ b/eng/targets/Helix.targets @@ -117,8 +117,8 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj $(TargetFileName) @(HelixPreCommand) @(HelixPostCommand) - call runtests.cmd $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout) - ./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout) + call runtests.cmd $(TargetFileName) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout) + ./runtests.sh $(TargetFileName) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout) $(HelixCommand) $(HelixTimeout) From a228673c63caa9df02ae2daeb11ec8285784020c Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Tue, 7 Jul 2020 00:31:40 -0700 Subject: [PATCH 18/21] Remove sdkVersion --- eng/helix/content/runtests.cmd | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/eng/helix/content/runtests.cmd b/eng/helix/content/runtests.cmd index 3be84568d199..4b3c4dfea6d6 100644 --- a/eng/helix/content/runtests.cmd +++ b/eng/helix/content/runtests.cmd @@ -4,17 +4,15 @@ setlocal enabledelayedexpansion REM Use '$' as a variable name prefix to avoid MSBuild variable collisions with these variables set $target=%1 -set $sdkVersion=%2 -set $runtimeVersion=%3 -set $queue=%4 -set $arch=%5 -set $quarantined=%6 -set $ef=%7 -set $aspnetruntime=%8 -set $aspnetref=%9 -REM Batch only supports up to 9 arguments using the %# syntax, need to shift to get more -shift +set $runtimeVersion=%2 +set $queue=%3 +set $arch=%4 +set $quarantined=%5 +set $ef=%6 +set $aspnetruntime=%7 +set $aspnetref=%8 set $helixTimeout=%9 +REM Batch only supports up to 9 arguments using the %# syntax, need to shift to get more set DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\dotnet set DOTNET_HOME=%DOTNET_ROOT% @@ -24,7 +22,7 @@ set DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\home set PATH=%DOTNET_ROOT%;!PATH!;%HELIX_CORRELATION_PAYLOAD%\node\bin echo Set path to: %PATH% -echo "Invoking InstallDotNet.ps1 %$arch% %$sdkVersion% %$runtimeVersion% %DOTNET_ROOT%" +echo "Invoking InstallDotNet.ps1 %$arch% %$runtimeVersion% %DOTNET_ROOT%" powershell.exe -NoProfile -ExecutionPolicy unrestricted -file InstallDotNet.ps1 %$arch% %$runtimeVersion% %DOTNET_ROOT% dotnet --list-sdks @@ -34,8 +32,8 @@ set exit_code=0 echo "Restore: dotnet restore RunTests\RunTests.csproj --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --source https://api.nuget.org/v3/index.json --ignore-failed-sources..." dotnet restore RunTests\RunTests.csproj --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --source https://api.nuget.org/v3/index.json --ignore-failed-sources -echo "Running tests: dotnet run --project RunTests\RunTests.csproj -- --target %$target% --sdk %$sdkVersion% --runtime %$runtimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --aspnetruntime %$aspnetruntime% --aspnetref %$aspnetref% --helixTimeout %$helixTimeout%..." -dotnet run --project RunTests\RunTests.csproj -- --target %$target% --sdk %$sdkVersion% --runtime %$runtimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --aspnetruntime %$aspnetruntime% --aspnetref %$aspnetref% --helixTimeout %$helixTimeout% +echo "Running tests: dotnet run --project RunTests\RunTests.csproj -- --target %$target% --runtime %$runtimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --aspnetruntime %$aspnetruntime% --aspnetref %$aspnetref% --helixTimeout %$helixTimeout%..." +dotnet run --project RunTests\RunTests.csproj -- --target %$target% --runtime %$runtimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --aspnetruntime %$aspnetruntime% --aspnetref %$aspnetref% --helixTimeout %$helixTimeout% if errorlevel neq 0 ( set exit_code=%errorlevel% ) From 923927fd80b3b2d822713f272875fa2ba41787ea Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Tue, 7 Jul 2020 00:33:19 -0700 Subject: [PATCH 19/21] Remove sdk version --- eng/helix/content/runtests.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/eng/helix/content/runtests.sh b/eng/helix/content/runtests.sh index bbb3451f91f3..583514535f1a 100644 --- a/eng/helix/content/runtests.sh +++ b/eng/helix/content/runtests.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash -dotnet_sdk_version="$2" -dotnet_runtime_version="$3" +dotnet_runtime_version="$2" RESET="\033[0m" RED="\033[0;31m" @@ -77,8 +76,8 @@ $DOTNET_ROOT/dotnet --list-runtimes exit_code=0 echo "Restore: $DOTNET_ROOT/dotnet restore RunTests/RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources..." $DOTNET_ROOT/dotnet restore RunTests/RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources -echo "Running tests: $DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj -- --target $1 --sdk $2 --runtime $3 --queue $4 --arch $5 --quarantined $6 --ef $7 --aspnetruntime $8 --aspnetref $9 --helixTimeout ${10}..." -$DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj -- --target $1 --sdk $2 --runtime $3 --queue $4 --arch $5 --quarantined $6 --ef $7 --aspnetruntime $8 --aspnetref $9 --helixTimeout ${10} +echo "Running tests: $DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj -- --target $1 --runtime $2 --queue $3 --arch $4 --quarantined $5 --ef $6 --aspnetruntime $7 --aspnetref $8 --helixTimeout $9..." +$DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj -- --target $1 --runtime $2 --queue $3 --arch $4 --quarantined $5 --ef $6 --aspnetruntime $7 --aspnetref $8 --helixTimeout $9 exit_code=$? echo "Finished tests...exit_code=$exit_code" From 6c5dd32316902f30d11314e1971806a970a78b34 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Tue, 7 Jul 2020 00:35:13 -0700 Subject: [PATCH 20/21] Remove sdk version --- eng/helix/content/RunTests/RunTestsOptions.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/eng/helix/content/RunTests/RunTestsOptions.cs b/eng/helix/content/RunTests/RunTestsOptions.cs index 9e076c970137..e62adef6d501 100644 --- a/eng/helix/content/RunTests/RunTestsOptions.cs +++ b/eng/helix/content/RunTests/RunTestsOptions.cs @@ -21,11 +21,6 @@ public static RunTestsOptions Parse(string[] args) description: "The test dll to run") { Argument = new Argument(), Required = true }, - new Option( - aliases: new string[] { "--sdk" }, - description: "The version of the sdk being used") - { Argument = new Argument(), Required = true }, - new Option( aliases: new string[] { "--runtime" }, description: "The version of the runtime being used") @@ -70,7 +65,6 @@ public static RunTestsOptions Parse(string[] args) var parseResult = command.Parse(args); var options = new RunTestsOptions(); options.Target = parseResult.ValueForOption("--target"); - options.SdkVersion = parseResult.ValueForOption("--sdk"); options.RuntimeVersion = parseResult.ValueForOption("--runtime"); options.HelixQueue = parseResult.ValueForOption("--queue"); options.Architecture = parseResult.ValueForOption("--arch"); @@ -86,7 +80,6 @@ public static RunTestsOptions Parse(string[] args) } public string Target { get; set;} - public string SdkVersion { get; set;} public string RuntimeVersion { get; set;} public string AspNetRuntime { get; set;} public string AspNetRef { get; set;} From 324a90089f1eab71b5b8bae08e7f8cd6adaba1e9 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Tue, 7 Jul 2020 22:47:39 -0700 Subject: [PATCH 21/21] Update helix.proj --- eng/helix/helix.proj | 8 -------- 1 file changed, 8 deletions(-) diff --git a/eng/helix/helix.proj b/eng/helix/helix.proj index d9fe0eb30d99..3a179a8866b7 100644 --- a/eng/helix/helix.proj +++ b/eng/helix/helix.proj @@ -1,17 +1,10 @@ - - - - - - $(NoWarn);MSB4011 - @@ -30,7 +23,6 @@ $(HelixApiAccessToken) true sdk - $(NETCoreSdkVersion) bin\