aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--src/test/sandbox/runtest_menu.bat51
-rw-r--r--src/test/sandbox/setup_sandbox.bat30
-rw-r--r--src/test/sandbox/startup.bat2
4 files changed, 80 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 1c980eac..6f1866b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -409,3 +409,6 @@ src/test/burn/TestData/Manual/BundleB/PackagePayloads
409# Allow the projects that end in ".Cab" 409# Allow the projects that end in ".Cab"
410!src/dtf/test/WixToolset.Dtf.Compression.Cab 410!src/dtf/test/WixToolset.Dtf.Compression.Cab
411!src/dtf/test/WixToolsetTests.Dtf.Compression.Cab 411!src/dtf/test/WixToolsetTests.Dtf.Compression.Cab
412
413#ignore the Sandbox
414src/test/sandbox/
diff --git a/src/test/sandbox/runtest_menu.bat b/src/test/sandbox/runtest_menu.bat
new file mode 100644
index 00000000..275199fe
--- /dev/null
+++ b/src/test/sandbox/runtest_menu.bat
@@ -0,0 +1,51 @@
1@setlocal EnableDelayedExpansion
2@echo off
3
4for /f "tokens=2 delims=[]" %%a in ('ping -n 1 -4 ""') do set IPAddr=%%a
5@if %PROCESSOR_ARCHITECTURE%=="ARM64" (
6 @if exist C:\sandbox\Debugger\ARM64\msvsmon.exe (
7 set MsVsMonPath=C:\sandbox\Debugger\ARM64\msvsmon.exe
8 )
9) else (
10 @if exist C:\sandbox\Debugger\x64\msvsmon.exe (
11 set MsVsMonPath=C:\sandbox\Debugger\x64\msvsmon.exe
12 )
13)
14
15:TestSelect
16cls
17REM Show the test select menu
18set index=0
19if not "%MsVsMonPath%"=="" (
20 echo [!index!] Run Remote Debugger SandboxIP=%IPAddr%
21 set "option[!index!]=%MsVsMonPath%"
22)
23
24for /f %%i in ('where /R c:\build runtests.cmd') do (
25 set /A "index+=1"
26 echo [!index!] %%i
27 set "option[!index!]=%%i!"
28)
29echo [q] Quit
30
31set /P "SelectTest=Please Choose The Test You Want To Execute: "
32if "%SelectTest%"=="q" Goto End
33if defined option[%SelectTest%] Goto TestSet
34
35:TestError
36cls
37Echo ERROR: Invalid Test Selected!!
38pause
39goto TestSelect
40
41:TestSet
42set "TestIs=!option[%SelectTest%]!"
43for %%a in (%TestIs%) do set FileDir=%%~dpa
44for %%a in (%TestIs%) do set FileName=%%~nxa
45start /D %FileDir% %FileName%
46if %SelectTest%==0 (
47goto TestSelect
48)
49
50:End
51@endlocal \ No newline at end of file
diff --git a/src/test/sandbox/setup_sandbox.bat b/src/test/sandbox/setup_sandbox.bat
index f74e7535..235f6724 100644
--- a/src/test/sandbox/setup_sandbox.bat
+++ b/src/test/sandbox/setup_sandbox.bat
@@ -1,16 +1,36 @@
1@setlocal 1@setlocal
2@SET DOTNET_VERSION=8.0 2@echo off
3SET DOTNET_VERSION=8.0
3 4
4@if not exist AMD64 (mkdir AMD64) 5if not exist AMD64 (mkdir AMD64)
5@if not exist ARM64 (mkdir ARM64) 6if not exist ARM64 (mkdir ARM64)
6@REM if not exist VSTest (mkdir VSTest) 7REM if not exist VSTest (mkdir VSTest)
7 8
9@echo on
8curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x64.zip --output ".\AMD64\dotnet-runtime.zip" 10curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x64.zip --output ".\AMD64\dotnet-runtime.zip"
9curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output ".\AMD64\dotnet-sdk.zip" 11curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output ".\AMD64\dotnet-sdk.zip"
10curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-arm64.zip --output ".\ARM64\dotnet-runtime.zip" 12curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-arm64.zip --output ".\ARM64\dotnet-runtime.zip"
11curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output ".\ARM64\dotnet-sdk.zip" 13curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output ".\ARM64\dotnet-sdk.zip"
14@echo off
12 15
13REM "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -prerelease 16REM curl -L0 https://aka.ms/vs/17/release/RemoteTools.amd64ret.enu.exe --output ".\AMD64\RemoteTools.exe"
17REM curl -L0 https://aka.ms/vs/17/release/RemoteTools.arm64ret.enu.exe --output ".\ARM64\RemoteTools.exe"
14 18
19for /f "usebackq tokens=*" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Debugger.Remote -property installationPath`) do (
20 set VsInstallDir=%%i
21)
22if "!VsInstallDir!"=="" (
23 for /f "usebackq tokens=*" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -prerelease -latest -requires Microsoft.VisualStudio.Debugger.Remote -property installationPath`) do (
24 set VsInstallDir=%%i
25 )
26)
27if "!VsInstallDir!"=="" (
28 set /P "Confirm=Have found VisualStudio Debugger at '%VsInstallDir%', Do you wish to copy it for use by the Sandbox? (Y / N):"
29 if "%Confirm%"=="Y" (
30 XCOPY "%VsInstallDir%\Common7\IDE\Remote Debugger\*" ".\Debugger\" /E
31 )
32)
15 33
34
35pause
16@endlocal 36@endlocal
diff --git a/src/test/sandbox/startup.bat b/src/test/sandbox/startup.bat
index 0f1b33d8..f09feeba 100644
--- a/src/test/sandbox/startup.bat
+++ b/src/test/sandbox/startup.bat
@@ -45,4 +45,4 @@ dotnet help
45 45
46@popd 46@popd
47cd c:\build 47cd c:\build
48start cmd 48start cmd /c C:\sandbox\runtest_menu.bat