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.
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 <bevan.weiss@gmail.com>
Bevan Weiss committed
Jun 25, 2024 at 17:58 UTC
89dc7b47809da06a69811788a1a990e216b81a5c
2 files changed
+22
-19
src/test/sandbox/setup_sandbox.bat
+2
-2
@@ -7,9 +7,9 @@ if not exist ARM64 (mkdir ARM64)
7
REM if not exist VSTest (mkdir VSTest)
8
9
@echo on
10
-curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x64.zip --output ".\AMD64\dotnet-runtime.zip"
10
+REM curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x64.zip --output ".\AMD64\dotnet-runtime.zip"
11
curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output ".\AMD64\dotnet-sdk.zip"
12
-curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-arm64.zip --output ".\ARM64\dotnet-runtime.zip"
12
+REM curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-arm64.zip --output ".\ARM64\dotnet-runtime.zip"
13
curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output ".\ARM64\dotnet-sdk.zip"
14
@echo off
15
src/test/sandbox/startup.bat
+20
-17
@@ -5,21 +5,21 @@ SET SANDBOX_FILES=C:\sandbox
5
pushd "%TEMP%"
6
7
mkdir "%ProgramFiles%\dotnet"
8
-@if exist %SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-runtime.zip (
9
- tar -oxzf "%SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-runtime.zip" -C "%ProgramFiles%\dotnet"
10
-) else (
11
- if %PROCESSOR_ARCHITECTURE%=="ARM64" (
12
- curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-arm64.zip --output dotnet-runtime.zip
13
- ) else (
14
- curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x64.zip --output dotnet-runtime.zip
15
- )
16
- if %errorlevel$ NEQ 0 (
17
- echo No pre-provided dotnet runtime, and failed to download. Confirm networking is available.
18
- goto :ERROR
19
- )
20
- tar -oxzf dotnet-runtime.zip -C "%ProgramFiles%\dotnet"
21
- del dotnet-runtime.zip
22
-)
8
+REM @if exist %SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-runtime.zip (
9
+REM tar -oxzf "%SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-runtime.zip" -C "%ProgramFiles%\dotnet"
10
+REM ) else (
11
+REM if %PROCESSOR_ARCHITECTURE%=="ARM64" (
12
+REM curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-arm64.zip --output dotnet-runtime.zip
13
+REM ) else (
14
+REM curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x64.zip --output dotnet-runtime.zip
15
+REM )
16
+REM if %errorlevel% NEQ 0 (
17
+REM echo No pre-provided dotnet runtime, and failed to download. Confirm networking is available.
18
+REM goto :ERROR
19
+REM )
20
+REM tar -oxzf dotnet-runtime.zip -C "%ProgramFiles%\dotnet"
21
+REM del dotnet-runtime.zip
22
+REM )
23
24
@if exist %SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-sdk.zip (
25
tar -oxzf "%SANDBOX_FILES%\%PROCESSOR_ARCHITECTURE%\dotnet-sdk.zip" -C "%ProgramFiles%\dotnet"
@@ -27,9 +27,12 @@ mkdir "%ProgramFiles%\dotnet"
27
if %PROCESSOR_ARCHITECTURE%=="ARM64" (
28
curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output dotnet-sdk.zip
29
) else (
30
- curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output dotnet-runtime.zip
30
+ curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output dotnet-sdk.zip
31
+ )
32
+ if %errorlevel% NEQ 0 (
33
+ echo "No pre-provided dotnet sdk, and failed to download. Confirm networking is available."
34
+ goto ERROR
35
)
32
- if %errorlevel$ NEQ 0 echo "No pre-provided dotnet sdk, and failed to download. Confirm networking is available." goto exit
36
tar -oxzf dotnet-sdk.zip -C "%ProgramFiles%\dotnet"
37
del dotnet-sdk.zip
38
)