@@ -7,17 +7,10 @@ set here=%~dp0
77set rt_opts = -q -d
88set regrtest_args =
99set arm32_ssh =
10+ set cmdline_args = %*
11+ set cmdline_args = %cmdline_args:, =#COMMA# %
1012
11- :CheckOpts
12- if " %~1 " == " -x64" (set rt_opts=%rt_opts% %1 ) & shift & goto CheckOpts
13- if " %~1 " == " -arm64" (set rt_opts=%rt_opts% %1 ) & shift & goto CheckOpts
14- if " %~1 " == " -arm32" (set rt_opts=%rt_opts% %1 ) & (set arm32_ssh=true) & shift & goto CheckOpts
15- if " %~1 " == " -d" (set rt_opts=%rt_opts% %1 ) & shift & goto CheckOpts
16- if " %~1 " == " -O" (set rt_opts=%rt_opts% %1 ) & shift & goto CheckOpts
17- if " %~1 " == " -q" (set rt_opts=%rt_opts% %1 ) & shift & goto CheckOpts
18- if " %~1 " == " +d" (set rt_opts=%rt_opts:-d =% ) & shift & goto CheckOpts
19- if " %~1 " == " +q" (set rt_opts=%rt_opts:-q =% ) & shift & goto CheckOpts
20- if NOT " %~1 " == " " (set regrtest_args=%regrtest_args% " %~1 " ) & shift & goto CheckOpts
13+ call :CheckOpts %cmdline_args%
2114
2215if " %PROCESSOR_ARCHITECTURE% " == " ARM" if " %arm32_ssh% " == " true" goto NativeExecution
2316if " %arm32_ssh% " == " true" goto :Arm32Ssh
@@ -49,3 +42,16 @@ echo The test worker should have the SSH agent running.
4942echo Also a key must be created with ssh-keygen and added to both the buildbot worker machine
5043echo and the ARM32 worker device: see https://docs.microsoft.com/en-us/windows/iot-core/connect-your-device/ssh
5144exit /b 127
45+
46+ :CheckOpts
47+ set arg = " %~1 "
48+ if %arg% == " -x64" (set rt_opts=%rt_opts% %1 ) & shift & goto CheckOpts
49+ if %arg% == " -arm64" (set rt_opts=%rt_opts% %1 ) & shift & goto CheckOpts
50+ if %arg% == " -arm32" (set rt_opts=%rt_opts% %1 ) & (set arm32_ssh=true) & shift & goto CheckOpts
51+ if %arg% == " -d" (set rt_opts=%rt_opts% %1 ) & shift & goto CheckOpts
52+ if %arg% == " -O" (set rt_opts=%rt_opts% %1 ) & shift & goto CheckOpts
53+ if %arg% == " -q" (set rt_opts=%rt_opts% %1 ) & shift & goto CheckOpts
54+ if %arg% == " +d" (set rt_opts=%rt_opts:-d =% ) & shift & goto CheckOpts
55+ if %arg% == " +q" (set rt_opts=%rt_opts:-q =% ) & shift & goto CheckOpts
56+ if NOT %arg% == " " (set regrtest_args=%regrtest_args% %arg:#COMMA# =, % ) & shift & goto CheckOpts
57+ goto :eof
0 commit comments