Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f355069a
Commit
f355069a
authored
Jun 19, 2019
by
Paul Monson
Committed by
Steve Dower
Jun 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-36511: Add buildbot scripts and fix tests for Windows ARM32 buildbot (GH-13454)
parent
12f1c726
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
107 additions
and
13 deletions
+107
-13
Lib/test/support/__init__.py
Lib/test/support/__init__.py
+3
-1
Lib/test/test_math.py
Lib/test/test_math.py
+2
-0
Lib/test/test_pyexpat.py
Lib/test/test_pyexpat.py
+2
-1
Lib/test/test_regrtest.py
Lib/test/test_regrtest.py
+4
-0
Lib/test/test_ssl.py
Lib/test/test_ssl.py
+9
-0
Tools/buildbot/remoteDeploy.bat
Tools/buildbot/remoteDeploy.bat
+48
-0
Tools/buildbot/remotePythonInfo.bat
Tools/buildbot/remotePythonInfo.bat
+34
-0
Tools/buildbot/test.bat
Tools/buildbot/test.bat
+5
-11
No files found.
Lib/test/support/__init__.py
View file @
f355069a
...
...
@@ -485,7 +485,9 @@ def _is_gui_available():
if
hasattr
(
_is_gui_available
,
'result'
):
return
_is_gui_available
.
result
reason
=
None
if
sys
.
platform
.
startswith
(
'win'
):
if
sys
.
platform
.
startswith
(
'win'
)
and
platform
.
win32_is_iot
():
reason
=
"gui is not available on Windows IoT Core"
elif
sys
.
platform
.
startswith
(
'win'
):
# if Python is running as a service (such as the buildbot service),
# gui interaction may be disallowed
import
ctypes
...
...
Lib/test/test_math.py
View file @
f355069a
...
...
@@ -468,6 +468,8 @@ class MathTests(unittest.TestCase):
self
.
assertRaises
(
ValueError
,
math
.
cos
,
NINF
)
self
.
assertTrue
(
math
.
isnan
(
math
.
cos
(
NAN
)))
@
unittest
.
skipIf
(
sys
.
platform
==
'win32'
and
platform
.
machine
()
in
(
'ARM'
,
'ARM64'
),
"Windows UCRT is off by 2 ULP this test requires accuracy within 1 ULP"
)
def
testCosh
(
self
):
self
.
assertRaises
(
TypeError
,
math
.
cosh
)
self
.
ftest
(
'cosh(0)'
,
math
.
cosh
(
0
),
1
)
...
...
Lib/test/test_pyexpat.py
View file @
f355069a
...
...
@@ -3,6 +3,7 @@
from
io
import
BytesIO
import
os
import
platform
import
sys
import
sysconfig
import
unittest
...
...
@@ -465,7 +466,7 @@ class HandlerExceptionTest(unittest.TestCase):
"pyexpat.c"
,
"StartElement"
)
self
.
check_traceback_entry
(
entries
[
2
],
"test_pyexpat.py"
,
"StartElementHandler"
)
if
sysconfig
.
is_python_build
():
if
sysconfig
.
is_python_build
()
and
not
(
sys
.
platform
==
'win32'
and
platform
.
machine
()
==
'ARM'
)
:
self
.
assertIn
(
'call_with_frame("StartElement"'
,
entries
[
1
][
3
])
...
...
Lib/test/test_regrtest.py
View file @
f355069a
...
...
@@ -618,6 +618,8 @@ class ProgramsTestCase(BaseTestCase):
test_args = ['
--
testdir
=%
s
' % self.tmptestdir]
if platform.machine() == '
ARM64
':
test_args.append('
-
arm64
') # ARM 64-bit build
elif platform.machine() == '
ARM
':
test_args.append('
-
arm32
') # 32-bit ARM build
elif platform.architecture()[0] == '
64
bit
':
test_args.append('
-
x64
') # 64-bit build
if not Py_DEBUG:
...
...
@@ -633,6 +635,8 @@ class ProgramsTestCase(BaseTestCase):
rt_args = ["-q"] # Quick, don'
t
run
tests
twice
if
platform
.
machine
()
==
'ARM64'
:
rt_args
.
append
(
'-arm64'
)
# ARM 64-bit build
elif
platform
.
machine
()
==
'ARM'
:
rt_args
.
append
(
'-arm32'
)
# 32-bit ARM build
elif
platform
.
architecture
()[
0
]
==
'64bit'
:
rt_args
.
append
(
'-x64'
)
# 64-bit build
if
Py_DEBUG
:
...
...
Lib/test/test_ssl.py
View file @
f355069a
...
...
@@ -28,6 +28,9 @@ ssl = support.import_module("ssl")
from
ssl
import
TLSVersion
,
_TLSContentType
,
_TLSMessageType
,
_TLSAlertType
Py_DEBUG
=
hasattr
(
sys
,
'gettotalrefcount'
)
Py_DEBUG_WIN32
=
Py_DEBUG
and
sys
.
platform
==
'win32'
PROTOCOLS
=
sorted
(
ssl
.
_PROTOCOL_NAMES
)
HOST
=
support
.
HOST
IS_LIBRESSL
=
ssl
.
OPENSSL_VERSION
.
startswith
(
'LibreSSL'
)
...
...
@@ -1347,6 +1350,7 @@ class ContextTests(unittest.TestCase):
ctx
.
load_verify_locations
(
cadata
=
b"broken"
)
@
unittest
.
skipIf
(
Py_DEBUG_WIN32
,
"Avoid mixing debug/release CRT on Windows"
)
def
test_load_dh_params
(
self
):
ctx
=
ssl
.
SSLContext
(
ssl
.
PROTOCOL_TLS_SERVER
)
ctx
.
load_dh_params
(
DHFILE
)
...
...
@@ -1665,6 +1669,7 @@ class SSLErrorTests(unittest.TestCase):
self
.
assertEqual
(
str
(
e
),
"foo"
)
self
.
assertEqual
(
e
.
errno
,
1
)
@
unittest
.
skipIf
(
Py_DEBUG_WIN32
,
"Avoid mixing debug/release CRT on Windows"
)
def
test_lib_reason
(
self
):
# Test the library and reason attributes
ctx
=
ssl
.
SSLContext
(
ssl
.
PROTOCOL_TLS_CLIENT
)
...
...
@@ -3845,6 +3850,7 @@ class ThreadedTests(unittest.TestCase):
sni_name
=
hostname
)
self
.
assertIs
(
stats
[
'compression'
],
None
)
@
unittest
.
skipIf
(
Py_DEBUG_WIN32
,
"Avoid mixing debug/release CRT on Windows"
)
def
test_dh_params
(
self
):
# Check we can get a connection with ephemeral Diffie-Hellman
client_context
,
server_context
,
hostname
=
testing_context
()
...
...
@@ -4440,6 +4446,7 @@ class TestSSLDebug(unittest.TestCase):
return
len
(
list
(
f
))
@
requires_keylog
@
unittest
.
skipIf
(
Py_DEBUG_WIN32
,
"Avoid mixing debug/release CRT on Windows"
)
def
test_keylog_defaults
(
self
):
self
.
addCleanup
(
support
.
unlink
,
support
.
TESTFN
)
ctx
=
ssl
.
SSLContext
(
ssl
.
PROTOCOL_TLS_CLIENT
)
...
...
@@ -4463,6 +4470,7 @@ class TestSSLDebug(unittest.TestCase):
ctx
.
keylog_filename
=
1
@
requires_keylog
@
unittest
.
skipIf
(
Py_DEBUG_WIN32
,
"Avoid mixing debug/release CRT on Windows"
)
def
test_keylog_filename
(
self
):
self
.
addCleanup
(
support
.
unlink
,
support
.
TESTFN
)
client_context
,
server_context
,
hostname
=
testing_context
()
...
...
@@ -4500,6 +4508,7 @@ class TestSSLDebug(unittest.TestCase):
@
requires_keylog
@
unittest
.
skipIf
(
sys
.
flags
.
ignore_environment
,
"test is not compatible with ignore_environment"
)
@
unittest
.
skipIf
(
Py_DEBUG_WIN32
,
"Avoid mixing debug/release CRT on Windows"
)
def
test_keylog_env
(
self
):
self
.
addCleanup
(
support
.
unlink
,
support
.
TESTFN
)
with
unittest
.
mock
.
patch
.
dict
(
os
.
environ
):
...
...
Tools/buildbot/remoteDeploy.bat
0 → 100644
View file @
f355069a
@echo
off
rem Used by the buildbot "remotedeploy" step.
setlocal
set
here
=
%~dp0
set
arm32_ssh
=
:CheckOpts
if
"
%
1"
==
"-arm32"
(
set
arm32_ssh
=
true
)
&
shift
&
goto
CheckOpts
if
NOT
"
%
1"
==
""
(
echo
unrecognized
option
%
1
)
&
goto
Arm32SshHelp
if
"
%arm3
2_ssh
%
"
==
"true"
goto
:Arm
32
Ssh
:Arm
32
Ssh
if
"
%SSH_SERVER%
"
==
""
goto
:Arm
32
SshHelp
if
"
%SSH%
"
==
""
if
EXIST
%WINDIR%
\System32\OpenSSH\ssh.exe
(
set
SSH
=
%WINDIR%
\System32\OpenSSH\ssh.exe
)
if
"
%SCP%
"
==
""
if
EXIST
%WINDIR%
\System32\OpenSSH\scp.exe
(
set
SCP
=
%WINDIR%
\System32\OpenSSH\scp.exe
)
echo
SSH
=
%SSH%
echo
SCP
=
%SCP%
if
"
%PYTHON_SOURCE%
"
==
""
(
set
PYTHON_SOURCE
=
%here%
..\..\
)
if
"
%REMOTE_PYTHON_DIR%
"
==
""
(
set
REMOTE_PYTHON_DIR
=
C
:\python\
)
if
NOT
"
%REMOTE
_PYTHON_DIR:~-1,1
%
"
==
"\"
(
set
REMOTE_PYTHON_DIR
=
%REMOTE_PYTHON_DIR%
\
)
%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"
%SSH%
%SSH_SERVER%
"md
%REMOTE_PYTHON_DIR%
Modules"
%SSH%
%SSH_SERVER%
"md
%REMOTE_PYTHON_DIR%
PC"
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"
%SCP%
-r
"
%PYTHON_SOURCE%
Tools"
"
%SSH_SERVER%
:
%REMOTE_PYTHON_DIR%
Tools"
%SCP%
"
%PYTHON_SOURCE%
Modules\Setup"
"
%SSH_SERVER%
:
%REMOTE_PYTHON_DIR%
Modules"
%SCP%
"
%PYTHON_SOURCE%
PC\pyconfig.h"
"
%SSH_SERVER%
:
%REMOTE_PYTHON_DIR%
PC"
exit
/b
%ERRORLEVEL%
:Arm
32
SshHelp
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
Tools/buildbot/remotePythonInfo.bat
0 → 100644
View file @
f355069a
@echo
off
rem Used by the buildbot "remotedeploy" step.
setlocal
set
here
=
%~dp0
set
arm32_ssh
=
set
suffix
=
_d
if
"
%REMOTE_PYTHON_DIR%
"
==
""
(
set
REMOTE_PYTHON_DIR
=
C
:\python\
)
if
NOT
"
%REMOTE
_PYTHON_DIR:~-1,1
%
"
==
"\"
(
set
REMOTE_PYTHON_DIR
=
%REMOTE_PYTHON_DIR%
\
)
:CheckOpts
if
"
%
1"
==
"-arm32"
(
set
arm32_ssh
=
true
)
&
(
set
prefix
=
%REMOTE_PYTHON_DIR%
pcbuild
\arm32
)
&
shift
&
goto
CheckOpts
if
"
%
1"
==
"-d"
(
set
suffix
=
_d
)
&
shift
&
goto
CheckOpts
if
"
%
1"
==
"+d"
(
set
suffix
=)
&
shift
&
goto
CheckOpts
if
NOT
"
%
1"
==
""
(
echo
unrecognized
option
%
1
)
&
goto
Arm32SshHelp
if
"
%arm3
2_ssh
%
"
==
"true"
goto
:Arm
32
Ssh
:Arm
32
Ssh
if
"
%SSH_SERVER%
"
==
""
goto
:Arm
32
SshHelp
if
"
%SSH%
"
==
""
if
EXIST
%WINDIR%
\System32\OpenSSH\ssh.exe
(
set
SSH
=
%WINDIR%
\System32\OpenSSH\ssh.exe
)
set
PYTHON_EXE
=
%prefix%
\python
%suffix%
.exe
echo
on
%SSH%
%SSH_SERVER%
%PYTHON_EXE%
-m
test
.pythoninfo
exit
/b
%ERRORLEVEL%
:Arm
32
SshHelp
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
Tools/buildbot/test.bat
View file @
f355069a
...
...
@@ -18,8 +18,10 @@ if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
if
"
%
1"
==
"+q"
(
set
rt_opts
=
%rt
_opts:
-q
=
%
)
&
shift
&
goto
CheckOpts
if
NOT
"
%
1"
==
""
(
set
regrtest_args
=
%regrtest_args%
%
1
)
&
shift
&
goto
CheckOpts
if
"
%PROCESSOR_ARCHITECTURE%
"
==
"ARM"
if
"
%arm3
2_ssh
%
"
==
"true"
goto
NativeExecution
if
"
%arm3
2_ssh
%
"
==
"true"
goto
:Arm
32
Ssh
:NativeExecution
call
"
%here%
..\..\PCbuild\rt.bat"
%rt_opts%
-uall -rwW
-
-slowest
-
-timeout
=
1200
-
-fail-env-changed
%regrtest_args%
exit
/b
%ERRORLEVEL%
...
...
@@ -28,20 +30,12 @@ set dashU=-unetwork,decimal,subprocess,urlfetch,tzdata
if
"
%SSH_SERVER%
"
==
""
goto
:Arm
32
SshHelp
if
"
%PYTHON_SOURCE%
"
==
""
(
set
PYTHON_SOURCE
=
%here%
..\..\
)
if
"
%REMOTE_PYTHON_DIR%
"
==
""
(
set
REMOTE_PYTHON_DIR
=
C
:\python\
)
if
NOT
"
%REMOTE
_PYTHON_DIR:~-1,1
%
"
==
"\"
(
set
REMOTE_PYTHON_DIR
=
%REMOTE_PYTHON_DIR%
\
)
if
"
%SSH%
"
==
""
if
EXIST
%WINDIR%
\System32\OpenSSH\ssh.exe
(
set
SSH
=
%WINDIR%
\System32\OpenSSH\ssh.exe
)
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%
%SSH%
%SSH_SERVER%
"set TEMP=
%REMOTE_PYTHON_DIR%
temp&
%REMOTE_PYTHON_DIR%
PCbuild\rt.bat"
%rt_args%
exit
/b
%ERRORLEVEL%
:Arm
32
SshHelp
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment