From 89dc7b47809da06a69811788a1a990e216b81a5c Mon Sep 17 00:00:00 2001 From: Bevan Weiss Date: Tue, 25 Jun 2024 17:58:54 +1000 Subject: Make faster... don't do both runtime and SDK, SDK is all we need Fix a couple of copy-paste errors in the "don't have files from host in Sandbox" path also. Signed-off-by: Bevan Weiss --- src/test/sandbox/setup_sandbox.bat | 4 ++-- src/test/sandbox/startup.bat | 37 ++++++++++++++++++++----------------- 2 files changed, 22 insertions(+), 19 deletions(-) (limited to 'src/test') diff --git a/src/test/sandbox/setup_sandbox.bat b/src/test/sandbox/setup_sandbox.bat index a3f0bbfe..c4378f52 100644 --- a/src/test/sandbox/setup_sandbox.bat +++ b/src/test/sandbox/setup_sandbox.bat @@ -7,9 +7,9 @@ if not exist ARM64 (mkdir ARM64) REM if not exist VSTest (mkdir VSTest) @echo on -curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x64.zip --output ".\AMD64\dotnet-runtime.zip" +REM curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x64.zip --output ".\AMD64\dotnet-runtime.zip" curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output ".\AMD64\dotnet-sdk.zip" -curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-arm64.zip --output ".\ARM64\dotnet-runtime.zip" +REM curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-arm64.zip --output ".\ARM64\dotnet-runtime.zip" curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output ".\ARM64\dotnet-sdk.zip" @echo off diff --git a/src/test/sandbox/startup.bat b/src/test/sandbox/startup.bat index f09feeba..ce0f2bbd 100644 --- a/src/test/sandbox/startup.bat +++ b/src/test/sandbox/startup.bat @@ -5,21 +5,21 @@ SET SANDBOX_FILES=C:\sandbox pushd "%TEMP%" mkdir "%ProgramFiles%\dotnet" -@if exist %SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-runtime.zip ( - tar -oxzf "%SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-runtime.zip" -C "%ProgramFiles%\dotnet" -) else ( - if %PROCESSOR_ARCHITECTURE%=="ARM64" ( - curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-arm64.zip --output dotnet-runtime.zip - ) else ( - curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x64.zip --output dotnet-runtime.zip - ) - if %errorlevel$ NEQ 0 ( - echo No pre-provided dotnet runtime, and failed to download. Confirm networking is available. - goto :ERROR - ) - tar -oxzf dotnet-runtime.zip -C "%ProgramFiles%\dotnet" - del dotnet-runtime.zip -) +REM @if exist %SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-runtime.zip ( +REM tar -oxzf "%SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-runtime.zip" -C "%ProgramFiles%\dotnet" +REM ) else ( +REM if %PROCESSOR_ARCHITECTURE%=="ARM64" ( +REM curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-arm64.zip --output dotnet-runtime.zip +REM ) else ( +REM curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x64.zip --output dotnet-runtime.zip +REM ) +REM if %errorlevel% NEQ 0 ( +REM echo No pre-provided dotnet runtime, and failed to download. Confirm networking is available. +REM goto :ERROR +REM ) +REM tar -oxzf dotnet-runtime.zip -C "%ProgramFiles%\dotnet" +REM del dotnet-runtime.zip +REM ) @if exist %SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-sdk.zip ( tar -oxzf "%SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-sdk.zip" -C "%ProgramFiles%\dotnet" @@ -27,9 +27,12 @@ mkdir "%ProgramFiles%\dotnet" if %PROCESSOR_ARCHITECTURE%=="ARM64" ( curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output dotnet-sdk.zip ) else ( - curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output dotnet-runtime.zip + curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output dotnet-sdk.zip + ) + if %errorlevel% NEQ 0 ( + echo "No pre-provided dotnet sdk, and failed to download. Confirm networking is available." + goto ERROR ) - if %errorlevel$ NEQ 0 echo "No pre-provided dotnet sdk, and failed to download. Confirm networking is available." goto exit tar -oxzf dotnet-sdk.zip -C "%ProgramFiles%\dotnet" del dotnet-sdk.zip ) -- cgit v1.2.3-55-g6feb