diff options
author | Bevan Weiss <bevan.weiss@gmail.com> | 2024-06-27 18:34:50 +1000 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2024-07-04 19:25:49 -0400 |
commit | 596b4c4ae90b757b069a97ef40de67a7d1f9ab73 (patch) | |
tree | 18edf9a51f46ac0724180f1db5d3b0d368f4050c /src/test | |
parent | 83d92ef88270a740bc96609f8d967986e4f91e99 (diff) | |
download | wix-596b4c4ae90b757b069a97ef40de67a7d1f9ab73.tar.gz wix-596b4c4ae90b757b069a97ef40de67a7d1f9ab73.tar.bz2 wix-596b4c4ae90b757b069a97ef40de67a7d1f9ab73.zip |
No longer support downloading within the Sandbox. Just error instead.
Install both the x64 AND the x86 versions of Windows Desktop Runtime.
Needed for the Burn Integration tests.
And having dotnet files in the sandbox directory was annoying, so put
them all into an assets directory
Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/sandbox/runtest_menu.bat | 8 | ||||
-rw-r--r-- | src/test/sandbox/setup_sandbox.bat | 27 | ||||
-rw-r--r-- | src/test/sandbox/startup.bat | 57 |
3 files changed, 51 insertions, 41 deletions
diff --git a/src/test/sandbox/runtest_menu.bat b/src/test/sandbox/runtest_menu.bat index fc6ad93e..cc7bd4cf 100644 --- a/src/test/sandbox/runtest_menu.bat +++ b/src/test/sandbox/runtest_menu.bat | |||
@@ -8,12 +8,12 @@ REM If we do offer the debugger, we better show the IP address too, since it see | |||
8 | REM to change for each invocation of the Sandbox environment | 8 | REM to change for each invocation of the Sandbox environment |
9 | for /f "tokens=2 delims=[]" %%a in ('ping -n 1 -4 ""') do set IPAddr=%%a | 9 | for /f "tokens=2 delims=[]" %%a in ('ping -n 1 -4 ""') do set IPAddr=%%a |
10 | @if %PROCESSOR_ARCHITECTURE%=="ARM64" ( | 10 | @if %PROCESSOR_ARCHITECTURE%=="ARM64" ( |
11 | @if exist C:\sandbox\Debugger\ARM64\msvsmon.exe ( | 11 | @if exist C:\sandbox\assets\Debugger\ARM64\msvsmon.exe ( |
12 | set "MsVsMonPath=C:\sandbox\Debugger\ARM64\msvsmon.exe /noauth /anyuser /nosecuritywarn" | 12 | set "MsVsMonPath=C:\sandbox\assets\Debugger\ARM64\msvsmon.exe /noauth /anyuser /nosecuritywarn" |
13 | ) | 13 | ) |
14 | ) else ( | 14 | ) else ( |
15 | @if exist C:\sandbox\Debugger\x64\msvsmon.exe ( | 15 | @if exist C:\sandbox\assets\Debugger\x64\msvsmon.exe ( |
16 | set "MsVsMonPath=C:\sandbox\Debugger\x64\msvsmon.exe /noauth /anyuser /nosecuritywarn" | 16 | set "MsVsMonPath=C:\sandbox\assets\Debugger\x64\msvsmon.exe /noauth /anyuser /nosecuritywarn" |
17 | ) | 17 | ) |
18 | ) | 18 | ) |
19 | FOR /F "tokens=* USEBACKQ" %%F IN (`powershell -Command "[System.Net.Dns]::GetHostEntry('localhost').HostName"`) DO ( | 19 | FOR /F "tokens=* USEBACKQ" %%F IN (`powershell -Command "[System.Net.Dns]::GetHostEntry('localhost').HostName"`) DO ( |
diff --git a/src/test/sandbox/setup_sandbox.bat b/src/test/sandbox/setup_sandbox.bat index dc462324..fac7ec4c 100644 --- a/src/test/sandbox/setup_sandbox.bat +++ b/src/test/sandbox/setup_sandbox.bat | |||
@@ -1,4 +1,4 @@ | |||
1 | @setlocal | 1 | @setlocal enabledelayedexpansion |
2 | @echo off | 2 | @echo off |
3 | SET DOTNET_VERSION=8.0 | 3 | SET DOTNET_VERSION=8.0 |
4 | 4 | ||
@@ -20,19 +20,28 @@ goto MENU | |||
20 | 20 | ||
21 | :EXE | 21 | :EXE |
22 | echo EXE> dotnet.cfg | 22 | echo EXE> dotnet.cfg |
23 | if not exist .\assets mkdir .\assets | ||
23 | if %PROCESSOR_ARCHITECTURE%=="ARM64" ( | 24 | if %PROCESSOR_ARCHITECTURE%=="ARM64" ( |
24 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.exe --output ".\dotnet-sdk.exe" | 25 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.exe --output ".\assets\dotnet-sdk-64.exe" |
26 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/windowsdesktop-runtime-win-arm64.exe --output ".\assets\windowsdesktop-runtime-64.exe" | ||
25 | ) else ( | 27 | ) else ( |
26 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.exe --output ".\dotnet-sdk.exe" | 28 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.exe --output ".\assets\dotnet-sdk-64.exe" |
29 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/windowsdesktop-runtime-win-x86.exe --output ".\assets\windowsdesktop-runtime-x86.exe" | ||
30 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/windowsdesktop-runtime-win-x64.exe --output ".\assets\windowsdesktop-runtime-64.exe" | ||
27 | ) | 31 | ) |
28 | goto VSDEBUG | 32 | goto VSDEBUG |
29 | 33 | ||
30 | :ZIP | 34 | :ZIP |
31 | echo ZIP> dotnet.cfg | 35 | echo ZIP> dotnet.cfg |
36 | if not exist .\assets mkdir .\assets | ||
32 | if %PROCESSOR_ARCHITECTURE%=="ARM64" ( | 37 | if %PROCESSOR_ARCHITECTURE%=="ARM64" ( |
33 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output ".\dotnet-sdk.zip" | 38 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output ".\assets\dotnet-sdk-64.zip" |
39 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/windowsdesktop-runtime-win-arm64.zip --output ".\assets\windowsdesktop-runtime-64.zip" | ||
34 | ) else ( | 40 | ) else ( |
35 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output ".\dotnet-sdk.zip" | 41 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output ".\assets\dotnet-sdk-64.zip" |
42 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/windowsdesktop-runtime-win-x64.zip --output ".\assets\windowsdesktop-runtime-64.zip" | ||
43 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x86.zip --output ".\assets\dotnet-runtime-x86.zip" | ||
44 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/windowsdesktop-runtime-win-x86.zip --output ".\assets\windowsdesktop-runtime-x86.zip" | ||
36 | ) | 45 | ) |
37 | goto VSDEBUG | 46 | goto VSDEBUG |
38 | 47 | ||
@@ -49,15 +58,15 @@ if not "!VsInstallDir!"=="" ( | |||
49 | echo. | 58 | echo. |
50 | echo Have found VisualStudio Debugger at '%VsInstallDir%' | 59 | echo Have found VisualStudio Debugger at '%VsInstallDir%' |
51 | set /P "Confirm=Do you wish to copy it for use by the Sandbox? (Y / N):" | 60 | set /P "Confirm=Do you wish to copy it for use by the Sandbox? (Y / N):" |
52 | if "%Confirm%"=="Y" goto VSDEBUG_COPY | 61 | if "!Confirm!"=="Y" goto VSDEBUG_COPY |
53 | if "%Confirm%"=="y" goto VSDEBUG_COPY | 62 | if "!Confirm!"=="y" goto VSDEBUG_COPY |
54 | goto END | 63 | goto END |
55 | ) | 64 | ) |
56 | goto END | 65 | goto END |
57 | 66 | ||
58 | :VSDEBUG_COPY | 67 | :VSDEBUG_COPY |
59 | if not exist Debugger (mkdir Debugger) | 68 | if not exist ".\assets\Debugger" (mkdir ".\assets\Debugger") |
60 | XCOPY "%VsInstallDir%\Common7\IDE\Remote Debugger\*" ".\Debugger\" /E /Y > nul | 69 | XCOPY "%VsInstallDir%\Common7\IDE\Remote Debugger\*" ".\assets\Debugger\" /E /Y > nul |
61 | echo Debugger files copied | 70 | echo Debugger files copied |
62 | 71 | ||
63 | 72 | ||
diff --git a/src/test/sandbox/startup.bat b/src/test/sandbox/startup.bat index 7b9b603f..8feaddd1 100644 --- a/src/test/sandbox/startup.bat +++ b/src/test/sandbox/startup.bat | |||
@@ -12,44 +12,45 @@ goto ERROR_NO_CONFIG | |||
12 | 12 | ||
13 | :ZIP | 13 | :ZIP |
14 | mkdir "%ProgramFiles%\dotnet" | 14 | mkdir "%ProgramFiles%\dotnet" |
15 | if exist %SANDBOX_FILES%\dotnet-sdk.zip ( | 15 | if exist %SANDBOX_FILES%\assets\dotnet-sdk-64.zip ( |
16 | tar -oxzf "%SANDBOX_FILES%\dotnet-sdk.zip" -C "%ProgramFiles%\dotnet" | 16 | tar -oxzf "%SANDBOX_FILES%\assets\dotnet-sdk-64.zip" -C "%ProgramFiles%\dotnet" |
17 | ) else ( | 17 | ) else ( |
18 | if %PROCESSOR_ARCHITECTURE%=="ARM64" ( | 18 | goto ERROR_NO_DOTNET |
19 | curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output dotnet-sdk.zip | 19 | ) |
20 | ) else ( | 20 | if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-64.zip ( |
21 | curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output dotnet-sdk.zip | 21 | tar -oxzf "%SANDBOX_FILES%\assets\windowsdesktop-runtime-64.zip" -C "%ProgramFiles%\dotnet" |
22 | ) | 22 | ) else ( |
23 | if %errorlevel% NEQ 0 ( | 23 | goto ERROR_NO_DOTNET |
24 | echo "No pre-provided dotnet sdk, and failed to download. Confirm networking is available." | 24 | ) |
25 | goto ERROR_NO_DOTNET | 25 | if exist %SANDBOX_FILES%\assets\dotnet-runtime-x86.zip ( |
26 | ) | 26 | mkdir "%ProgramFiles(x86)%\dotnet" |
27 | tar -oxzf dotnet-sdk.zip -C "%ProgramFiles%\dotnet" | 27 | tar -oxzf "%SANDBOX_FILES%\assets\dotnet-runtime-x86.zip" -C "%ProgramFiles(x86)%\dotnet" |
28 | del dotnet-sdk.zip | 28 | ) |
29 | if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.zip ( | ||
30 | tar -oxzf "%SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.zip" -C "%ProgramFiles(x86)%\dotnet" | ||
29 | ) | 31 | ) |
30 | goto PROCEED | 32 | goto PROCEED |
31 | 33 | ||
32 | :EXE | 34 | :EXE |
33 | if exist %SANDBOX_FILES%\dotnet-sdk.exe ( | 35 | if exist %SANDBOX_FILES%\assets\dotnet-sdk-64.exe ( |
34 | "%SANDBOX_FILES%\dotnet-sdk.exe" /install /quiet /norestart | 36 | "%SANDBOX_FILES%\assets\dotnet-sdk-64.exe" /install /quiet /norestart |
35 | ) else ( | 37 | ) else ( |
36 | if %PROCESSOR_ARCHITECTURE%=="ARM64" ( | 38 | goto ERROR_NO_DOTNET |
37 | curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.exe --output dotnet-sdk.exe | 39 | ) |
38 | ) else ( | 40 | if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-64.exe ( |
39 | curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.exe --output dotnet-sdk.exe | 41 | "%SANDBOX_FILES%\assets\windowsdesktop-runtime-64.exe" /install /quiet /norestart |
40 | ) | 42 | ) else ( |
41 | if %errorlevel% NEQ 0 ( | 43 | goto ERROR_NO_DOTNET |
42 | echo "No pre-provided dotnet sdk, and failed to download. Confirm networking is available." | 44 | ) |
43 | goto ERROR_NO_DOTNET | 45 | if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.exe ( |
44 | ) | 46 | "%SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.exe" /install /quiet /norestart |
45 | dotnet-sdk.exe /install /quiet /norestart | ||
46 | ) | 47 | ) |
47 | goto PROCEED | 48 | goto PROCEED |
48 | 49 | ||
49 | :PROCEED | 50 | :PROCEED |
50 | endlocal | 51 | endlocal |
51 | SETX PATH "%PATH%;%ProgramFiles%\dotnet" /M | 52 | SETX PATH "%PATH%;%ProgramFiles%\dotnet;%ProgramFiles(x86)%\dotnet" /M |
52 | SET PATH=%PATH%;%ProgramFiles%\dotnet | 53 | SET PATH=%PATH%;%ProgramFiles%\dotnet;%ProgramFiles(x86)%\dotnet |
53 | 54 | ||
54 | dotnet nuget locals all --clear | 55 | dotnet nuget locals all --clear |
55 | dotnet help | 56 | dotnet help |
@@ -65,6 +66,6 @@ goto END | |||
65 | 66 | ||
66 | 67 | ||
67 | :ERROR_NO_DOTNET | 68 | :ERROR_NO_DOTNET |
68 | start "ERROR" CMD /c echo ERROR: Failed to find dotnet install, and download failed. Run setup_sandbox.bat again ^& pause | 69 | start "ERROR" CMD /c echo ERROR: Failed to find dotnet install files. Run setup_sandbox.bat again ^& pause |
69 | 70 | ||
70 | :END | 71 | :END |