2017-06-10 16:58:42 -03:00
|
|
|
@echo off
|
2017-06-16 09:38:34 -03:00
|
|
|
rem Used by the buildbot "test" step.
|
2017-06-10 16:58:42 -03:00
|
|
|
setlocal
|
|
|
|
|
2019-06-20 13:33:32 -03:00
|
|
|
set PATH=%PATH%;%SystemRoot%\SysNative\OpenSSH;%SystemRoot%\System32\OpenSSH
|
2017-06-10 16:58:42 -03:00
|
|
|
set here=%~dp0
|
|
|
|
set rt_opts=-q -d
|
2023-09-26 12:22:50 -03:00
|
|
|
set regrtest_args=
|
2019-05-15 19:42:29 -03:00
|
|
|
set arm32_ssh=
|
2024-02-16 16:24:56 -04:00
|
|
|
set cmdline_args=%*
|
|
|
|
set cmdline_args=%cmdline_args:,=#COMMA#%
|
2017-06-10 16:58:42 -03:00
|
|
|
|
2024-02-16 16:24:56 -04:00
|
|
|
call:CheckOpts %cmdline_args%
|
2017-06-10 16:58:42 -03:00
|
|
|
|
2019-06-19 17:09:54 -03:00
|
|
|
if "%PROCESSOR_ARCHITECTURE%"=="ARM" if "%arm32_ssh%"=="true" goto NativeExecution
|
2019-05-15 19:42:29 -03:00
|
|
|
if "%arm32_ssh%"=="true" goto :Arm32Ssh
|
|
|
|
|
2019-06-19 17:09:54 -03:00
|
|
|
:NativeExecution
|
2023-09-26 12:22:50 -03:00
|
|
|
call "%here%..\..\PCbuild\rt.bat" %rt_opts% --slow-ci %regrtest_args%
|
2019-05-24 13:15:39 -03:00
|
|
|
exit /b %ERRORLEVEL%
|
2019-05-15 19:42:29 -03:00
|
|
|
|
|
|
|
:Arm32Ssh
|
2019-06-21 13:40:05 -03:00
|
|
|
set dashU=-unetwork -udecimal -usubprocess -uurlfetch -utzdata
|
2019-05-15 19:42:29 -03:00
|
|
|
if "%SSH_SERVER%"=="" goto :Arm32SshHelp
|
|
|
|
if "%PYTHON_SOURCE%"=="" (set PYTHON_SOURCE=%here%..\..\)
|
|
|
|
if "%REMOTE_PYTHON_DIR%"=="" (set REMOTE_PYTHON_DIR=C:\python\)
|
2019-06-19 17:09:54 -03:00
|
|
|
if NOT "%REMOTE_PYTHON_DIR:~-1,1%"=="\" (set REMOTE_PYTHON_DIR=%REMOTE_PYTHON_DIR%\)
|
2019-06-20 13:33:32 -03:00
|
|
|
|
2019-05-15 19:42:29 -03:00
|
|
|
set TEMP_ARGS=--temp %REMOTE_PYTHON_DIR%temp
|
|
|
|
|
2023-09-26 12:22:50 -03:00
|
|
|
set rt_args=%rt_opts% --slow-ci %dashU% %regrtest_args% %TEMP_ARGS%
|
2020-07-07 20:24:39 -03:00
|
|
|
ssh %SSH_SERVER% "set TEMP=%REMOTE_PYTHON_DIR%temp& cd %REMOTE_PYTHON_DIR% & %REMOTE_PYTHON_DIR%PCbuild\rt.bat" %rt_args%
|
|
|
|
set ERR=%ERRORLEVEL%
|
|
|
|
scp %SSH_SERVER%:"%REMOTE_PYTHON_DIR%test-results.xml" "%PYTHON_SOURCE%\test-results.xml"
|
|
|
|
exit /b %ERR%
|
2019-05-15 19:42:29 -03:00
|
|
|
|
|
|
|
:Arm32SshHelp
|
|
|
|
echo SSH_SERVER environment variable must be set to administrator@[ip address]
|
|
|
|
echo where [ip address] is the address of a Windows IoT Core ARM32 device.
|
|
|
|
echo.
|
|
|
|
echo The test worker should have the SSH agent running.
|
|
|
|
echo Also a key must be created with ssh-keygen and added to both the buildbot worker machine
|
|
|
|
echo and the ARM32 worker device: see https://docs.microsoft.com/en-us/windows/iot-core/connect-your-device/ssh
|
|
|
|
exit /b 127
|
2024-02-16 16:24:56 -04:00
|
|
|
|
|
|
|
:CheckOpts
|
|
|
|
set arg="%~1"
|
|
|
|
if %arg%=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
|
|
|
if %arg%=="-arm64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
|
|
|
if %arg%=="-arm32" (set rt_opts=%rt_opts% %1) & (set arm32_ssh=true) & shift & goto CheckOpts
|
|
|
|
if %arg%=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
|
|
|
if %arg%=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
|
|
|
if %arg%=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
|
|
|
if %arg%=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
|
|
|
|
if %arg%=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
|
|
|
|
if NOT %arg%=="" (set regrtest_args=%regrtest_args% %arg:#COMMA#=,%) & shift & goto CheckOpts
|
|
|
|
goto:eof
|