Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1d33fe6

Browse filesBrowse files
author
Paul Monson
committed
bpo-36511: Fix Windows arm32 buildbot pythoninfo, scp, and ssh
1 parent 1a3faf9 commit 1d33fe6
Copy full SHA for 1d33fe6

File tree

Expand file treeCollapse file tree

4 files changed

+77
-13
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+77
-13
lines changed

‎Lib/test/support/__init__.py

Copy file name to clipboardExpand all lines: Lib/test/support/__init__.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,9 @@ def _is_gui_available():
485485
if hasattr(_is_gui_available, 'result'):
486486
return _is_gui_available.result
487487
reason = None
488-
if sys.platform.startswith('win'):
488+
if sys.platform.startswith('win') and platform.win32_is_iot():
489+
reason = "gui is not available on Windows IoT Core"
490+
elif sys.platform.startswith('win'):
489491
# if Python is running as a service (such as the buildbot service),
490492
# gui interaction may be disallowed
491493
import ctypes

‎Tools/buildbot/remoteDeploy.bat

Copy file name to clipboard
+42Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
@echo off
2+
rem Used by the buildbot "remotedeploy" step.
3+
setlocal
4+
5+
set here=%~dp0
6+
set arm32_ssh=
7+
8+
:CheckOpts
9+
if "%1"=="-arm32" (set arm32_ssh=true) & shift & goto CheckOpts
10+
if NOT "%1"=="" (echo unrecognized option %1) & goto Arm32SshHelp
11+
12+
if "%arm32_ssh%"=="true" goto :Arm32Ssh
13+
14+
:Arm32Ssh
15+
if "%SSH_SERVER%"=="" goto :Arm32SshHelp
16+
if "%SSH%"=="" if EXIST %WINDIR%\System32\OpenSSH\ssh.exe (set SSH=%WINDIR%\System32\OpenSSH\ssh.exe)
17+
if "%SCP%"=="" if EXIST %WINDIR%\System32\OpenSSH\scp.exe (set SCP=%WINDIR%\System32\OpenSSH\scp.exe)
18+
echo SSH = %SSH%
19+
echo SCP = %SCP%
20+
if "%PYTHON_SOURCE%"=="" (set PYTHON_SOURCE=%here%..\..\)
21+
if "%REMOTE_PYTHON_DIR%"=="" (set REMOTE_PYTHON_DIR=C:\python\)
22+
%SSH% %SSH_SERVER% "if EXIST %REMOTE_PYTHON_DIR% (rd %REMOTE_PYTHON_DIR% /s/q)"
23+
%SSH% %SSH_SERVER% "md %REMOTE_PYTHON_DIR%PCBuild\arm32"
24+
%SSH% %SSH_SERVER% "md %REMOTE_PYTHON_DIR%temp"
25+
for /f "USEBACKQ" %%i in (`dir PCbuild\*.bat /b`) do @%SCP% PCBuild\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild"
26+
for /f "USEBACKQ" %%i in (`dir PCbuild\*.py /b`) do @%SCP% PCBuild\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild"
27+
for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.exe /b`) do @%SCP% PCBuild\arm32\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild\arm32"
28+
for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.pyd /b`) do @%SCP% PCBuild\arm32\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild\arm32"
29+
for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.dll /b`) do @%SCP% PCBuild\arm32\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild\arm32"
30+
%SCP% -r "%PYTHON_SOURCE%Include" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Include"
31+
%SCP% -r "%PYTHON_SOURCE%Lib" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Lib"
32+
33+
exit /b 0
34+
35+
:Arm32SshHelp
36+
echo SSH_SERVER environment variable must be set to administrator@[ip address]
37+
echo where [ip address] is the address of a Windows IoT Core ARM32 device.
38+
echo.
39+
echo The test worker should have the SSH agent running.
40+
echo Also a key must be created with ssh-keygen and added to both the buildbot worker machine
41+
echo and the ARM32 worker device: see https://docs.microsoft.com/en-us/windows/iot-core/connect-your-device/ssh
42+
exit /b 127

‎Tools/buildbot/remotePythonInfo.bat

Copy file name to clipboard
+30Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@echo off
2+
rem Used by the buildbot "remotedeploy" step.
3+
setlocal
4+
5+
set here=%~dp0
6+
set arm32_ssh=
7+
8+
:CheckOpts
9+
if "%1"=="-arm32" (set arm32_ssh=true) & (set prefix=c:\python\pcbuild\arm32) & shift & goto CheckOpts
10+
if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts
11+
if NOT "%1"=="" (echo unrecognized option %1) & goto Arm32SshHelp
12+
13+
if "%arm32_ssh%"=="true" goto :Arm32Ssh
14+
15+
:Arm32Ssh
16+
if "%SSH_SERVER%"=="" goto :Arm32SshHelp
17+
if "%SSH%"=="" if EXIST %WINDIR%\System32\OpenSSH\ssh.exe (set SSH=%WINDIR%\System32\OpenSSH\ssh.exe)
18+
set PYTHON_EXE=%prefix%\python%suffix%.exe
19+
echo on
20+
%SSH% %SSH_SERVER% %PYTHON_EXE% -m test.pythoninfo
21+
exit /b 0
22+
23+
:Arm32SshHelp
24+
echo SSH_SERVER environment variable must be set to administrator@[ip address]
25+
echo where [ip address] is the address of a Windows IoT Core ARM32 device.
26+
echo.
27+
echo The test worker should have the SSH agent running.
28+
echo Also a key must be created with ssh-keygen and added to both the buildbot worker machine
29+
echo and the ARM32 worker device: see https://docs.microsoft.com/en-us/windows/iot-core/connect-your-device/ssh
30+
exit /b 127

‎Tools/buildbot/test.bat

Copy file name to clipboardExpand all lines: Tools/buildbot/test.bat
+2-12Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
1717
if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
1818
if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts
1919

20-
echo on
2120
if "%arm32_ssh%"=="true" goto :Arm32Ssh
2221

2322
call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW --slowest --timeout=1200 --fail-env-changed %regrtest_args%
@@ -28,20 +27,11 @@ set dashU=-unetwork,decimal,subprocess,urlfetch,tzdata
2827
if "%SSH_SERVER%"=="" goto :Arm32SshHelp
2928
if "%PYTHON_SOURCE%"=="" (set PYTHON_SOURCE=%here%..\..\)
3029
if "%REMOTE_PYTHON_DIR%"=="" (set REMOTE_PYTHON_DIR=C:\python\)
30+
if "%SSH%"=="" if EXIST %WINDIR%\System32\OpenSSH\ssh.exe (set SSH=%WINDIR%\System32\OpenSSH\ssh.exe)
3131
set TEMP_ARGS=--temp %REMOTE_PYTHON_DIR%temp
32-
ssh %SSH_SERVER% "if EXIST %REMOTE_PYTHON_DIR% (rd %REMOTE_PYTHON_DIR% /s/q)"
33-
ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%PCBuild\arm32"
34-
ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%temp"
35-
for /f "USEBACKQ" %%i in (`dir PCbuild\*.bat /b`) do @scp PCBuild\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild"
36-
for /f "USEBACKQ" %%i in (`dir PCbuild\*.py /b`) do @scp PCBuild\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild"
37-
for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.exe /b`) do @scp PCBuild\arm32\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild\arm32"
38-
for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.pyd /b`) do @scp PCBuild\arm32\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild\arm32"
39-
for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.dll /b`) do @scp PCBuild\arm32\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild\arm32"
40-
scp -r "%PYTHON_SOURCE%Include" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Include"
41-
scp -r "%PYTHON_SOURCE%Lib" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Lib"
4232

4333
set rt_args=%rt_opts% %dashU% -rwW --slowest --timeout=1200 --fail-env-changed %regrtest_args% %TEMP_ARGS%
44-
ssh %SSH_SERVER% "set TEMP=%REMOTE_PYTHON_DIR%temp& %REMOTE_PYTHON_DIR%PCbuild\rt.bat" %rt_args%
34+
%SSH% %SSH_SERVER% "set TEMP=%REMOTE_PYTHON_DIR%temp& %REMOTE_PYTHON_DIR%PCbuild\rt.bat" %rt_args%
4535
exit /b 0
4636

4737
:Arm32SshHelp

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.