summaryrefslogtreecommitdiff
path: root/src/test/sandbox/runtest_menu.bat
diff options
context:
space:
mode:
authorBevan Weiss <bevan.weiss@gmail.com>2024-06-22 03:37:22 +1000
committerBob Arnson <github@bobs.org>2024-07-04 19:25:49 -0400
commitd2582c7bdbb09513849b36a49b5f992c2bc58e78 (patch)
tree186542b02a1e1c431a708a42416097318accba3d /src/test/sandbox/runtest_menu.bat
parenta4f09c89c7c044f606ddf6bcff587ccb693560bf (diff)
downloadwix-d2582c7bdbb09513849b36a49b5f992c2bc58e78.tar.gz
wix-d2582c7bdbb09513849b36a49b5f992c2bc58e78.tar.bz2
wix-d2582c7bdbb09513849b36a49b5f992c2bc58e78.zip
Added some more modifications to the Sandbox.
It will now prompt for configuring the Remote Debugger if it can find it on the host when doing the setup. And will prompt within the Sandbox to run the Debugger at startup if found It will also show the host-local IP address to connect to the debugger. In addition, it will display a small menu to allow for simple selection of a particular runtests.cmd version to execute. I still haven't found a good way to get a debugger attached into the msiexec environment without already having a coded breakpoint in, however. Also added this sandbox folder to .gitignore, so that artifacts from here aren't committed into the repo Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'src/test/sandbox/runtest_menu.bat')
-rw-r--r--src/test/sandbox/runtest_menu.bat51
1 files changed, 51 insertions, 0 deletions
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