From 67ff6a103a1184b572750c30e231968c963e72f8 Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Wed, 15 May 2019 15:42:29 -0700 Subject: [PATCH] bpo-36511: Windows ARM32 buildbot changes (GH-12917) --- PCbuild/rt.bat | 1 + Tools/buildbot/test.bat | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/PCbuild/rt.bat b/PCbuild/rt.bat index 212befc95b0..e603de6d517 100644 --- a/PCbuild/rt.bat +++ b/PCbuild/rt.bat @@ -39,6 +39,7 @@ if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts if "%1"=="-x64" (set prefix=%pcbuild%amd64) & shift & goto CheckOpts +if "%1"=="-arm32" (set prefix=%pcbuild%arm32) & shift & goto CheckOpts if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts if not defined prefix set prefix=%pcbuild%win32 diff --git a/Tools/buildbot/test.bat b/Tools/buildbot/test.bat index 40ffc7efdd2..7815c55c152 100644 --- a/Tools/buildbot/test.bat +++ b/Tools/buildbot/test.bat @@ -5,9 +5,11 @@ setlocal set here=%~dp0 set rt_opts=-q -d set regrtest_args=-j1 +set arm32_ssh= :CheckOpts if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts +if "%1"=="-arm32" (set rt_opts=%rt_opts% %1) & (set arm32_ssh=true) & shift & goto CheckOpts if "%1"=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts if "%1"=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts if "%1"=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts @@ -16,4 +18,37 @@ if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts echo on +if "%arm32_ssh%"=="true" goto :Arm32Ssh + call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW --slowest --timeout=1200 --fail-env-changed %regrtest_args% +exit /b 0 + +:Arm32Ssh +set dashU=-unetwork,decimal,subprocess,urlfetch,tzdata +if "%SSH_SERVER%"=="" goto :Arm32SshHelp +if "%PYTHON_SOURCE%"=="" (set PYTHON_SOURCE=%here%..\..\) +if "%REMOTE_PYTHON_DIR%"=="" (set REMOTE_PYTHON_DIR=C:\python\) +set TEMP_ARGS=--temp %REMOTE_PYTHON_DIR%temp +ssh %SSH_SERVER% "if EXIST %REMOTE_PYTHON_DIR% (rd %REMOTE_PYTHON_DIR% /s/q)" +ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%PCBuild\arm32" +ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%temp" +for /f "USEBACKQ" %%i in (`dir PCbuild\*.bat /b`) do @scp PCBuild\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild" +for /f "USEBACKQ" %%i in (`dir PCbuild\*.py /b`) do @scp PCBuild\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild" +for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.exe /b`) do @scp PCBuild\arm32\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild\arm32" +for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.pyd /b`) do @scp PCBuild\arm32\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild\arm32" +for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.dll /b`) do @scp PCBuild\arm32\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild\arm32" +scp -r "%PYTHON_SOURCE%Include" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Include" +scp -r "%PYTHON_SOURCE%Lib" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Lib" + +set rt_args=%rt_opts% %dashU% -rwW --slowest --timeout=1200 --fail-env-changed %regrtest_args% %TEMP_ARGS% +ssh %SSH_SERVER% "set TEMP=%REMOTE_PYTHON_DIR%temp & %REMOTE_PYTHON_DIR%PCbuild\rt.bat" %rt_args% +exit /b 0 + +: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