summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-06-07 18:17:52 (GMT)
committerGitHub <noreply@github.com>2019-06-07 18:17:52 (GMT)
commit84d47bd8ad48f29ed5d333f4307408ad1e081f59 (patch)
tree08060c793befbf9d12763a7f7a90c0a20edeac8e
parent9689f80e61e5863668a562793ebb85031ef9fd3e (diff)
downloadcpython-84d47bd8ad48f29ed5d333f4307408ad1e081f59.zip
cpython-84d47bd8ad48f29ed5d333f4307408ad1e081f59.tar.gz
cpython-84d47bd8ad48f29ed5d333f4307408ad1e081f59.tar.bz2
bpo-37181: Fix test_regrtest failures on Windows arm64 (GH-13872)
(cherry picked from commit e7e5039d6940e41839dcef0433262ff363408dad) Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
-rw-r--r--Lib/test/test_regrtest.py8
-rw-r--r--PCbuild/rt.bat1
-rw-r--r--Tools/buildbot/test.bat2
3 files changed, 8 insertions, 3 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
index 9155522..b616e89 100644
--- a/Lib/test/test_regrtest.py
+++ b/Lib/test/test_regrtest.py
@@ -616,7 +616,9 @@ class ProgramsTestCase(BaseTestCase):
# Tools\buildbot\test.bat
script = os.path.join(ROOT_DIR, 'Tools', 'buildbot', 'test.bat')
test_args = ['--testdir=%s' % self.tmptestdir]
- if platform.architecture()[0] == '64bit':
+ if platform.machine() == 'ARM64':
+ test_args.append('-arm64') # ARM 64-bit build
+ elif platform.architecture()[0] == '64bit':
test_args.append('-x64') # 64-bit build
if not Py_DEBUG:
test_args.append('+d') # Release build, use python.exe
@@ -629,7 +631,9 @@ class ProgramsTestCase(BaseTestCase):
if not os.path.isfile(script):
self.skipTest(f'File "{script}" does not exist')
rt_args = ["-q"] # Quick, don't run tests twice
- if platform.architecture()[0] == '64bit':
+ if platform.machine() == 'ARM64':
+ rt_args.append('-arm64') # ARM 64-bit build
+ elif platform.architecture()[0] == '64bit':
rt_args.append('-x64') # 64-bit build
if Py_DEBUG:
rt_args.append('-d') # Debug build, use python_d.exe
diff --git a/PCbuild/rt.bat b/PCbuild/rt.bat
index e603de6..59f757c 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"=="-arm64" (set prefix=%pcbuild%arm64) & shift & goto CheckOpts
if "%1"=="-arm32" (set prefix=%pcbuild%arm32) & shift & goto CheckOpts
if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts
diff --git a/Tools/buildbot/test.bat b/Tools/buildbot/test.bat
index f430680..1566f46 100644
--- a/Tools/buildbot/test.bat
+++ b/Tools/buildbot/test.bat
@@ -9,6 +9,7 @@ set arm32_ssh=
:CheckOpts
if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
+if "%1"=="-arm64" (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
@@ -17,7 +18,6 @@ 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
-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%