From 1d33fe686713807d88602135f2fb13c7d94d0c6e Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Mon, 20 May 2019 15:59:50 -0700 Subject: [PATCH 01/18] bpo-36511: Fix Windows arm32 buildbot pythoninfo, scp, and ssh --- Lib/test/support/__init__.py | 4 ++- Tools/buildbot/remoteDeploy.bat | 42 +++++++++++++++++++++++++++++ Tools/buildbot/remotePythonInfo.bat | 30 +++++++++++++++++++++ Tools/buildbot/test.bat | 14 ++-------- 4 files changed, 77 insertions(+), 13 deletions(-) create mode 100644 Tools/buildbot/remoteDeploy.bat create mode 100644 Tools/buildbot/remotePythonInfo.bat diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 9e60d960ab12f4..803a65ed94c208 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -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 diff --git a/Tools/buildbot/remoteDeploy.bat b/Tools/buildbot/remoteDeploy.bat new file mode 100644 index 00000000000000..0ada7d570b7b0f --- /dev/null +++ b/Tools/buildbot/remoteDeploy.bat @@ -0,0 +1,42 @@ +@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 "%arm32_ssh%"=="true" goto :Arm32Ssh + +:Arm32Ssh +if "%SSH_SERVER%"=="" goto :Arm32SshHelp +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\) +%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" + +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 diff --git a/Tools/buildbot/remotePythonInfo.bat b/Tools/buildbot/remotePythonInfo.bat new file mode 100644 index 00000000000000..53a6cca87cbe7a --- /dev/null +++ b/Tools/buildbot/remotePythonInfo.bat @@ -0,0 +1,30 @@ +@echo off +rem Used by the buildbot "remotedeploy" step. +setlocal + +set here=%~dp0 +set arm32_ssh= + +:CheckOpts +if "%1"=="-arm32" (set arm32_ssh=true) & (set prefix=c:\python\pcbuild\arm32) & shift & goto CheckOpts +if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts +if NOT "%1"=="" (echo unrecognized option %1) & goto Arm32SshHelp + +if "%arm32_ssh%"=="true" goto :Arm32Ssh + +:Arm32Ssh +if "%SSH_SERVER%"=="" goto :Arm32SshHelp +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 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 diff --git a/Tools/buildbot/test.bat b/Tools/buildbot/test.bat index b84e8e25567215..7a8bead8d3cd37 100644 --- a/Tools/buildbot/test.bat +++ b/Tools/buildbot/test.bat @@ -17,7 +17,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% @@ -28,20 +27,11 @@ 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\) +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 0 :Arm32SshHelp From 3aadf52ae468a6fdab88d1c617b8d7649087349f Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Tue, 21 May 2019 12:07:41 -0700 Subject: [PATCH 02/18] add +d to match test.bat --- Tools/buildbot/remotePythonInfo.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/buildbot/remotePythonInfo.bat b/Tools/buildbot/remotePythonInfo.bat index 53a6cca87cbe7a..daf575e204520c 100644 --- a/Tools/buildbot/remotePythonInfo.bat +++ b/Tools/buildbot/remotePythonInfo.bat @@ -4,10 +4,11 @@ setlocal set here=%~dp0 set arm32_ssh= - +set suffix=_d :CheckOpts if "%1"=="-arm32" (set arm32_ssh=true) & (set prefix=c:\python\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 "%arm32_ssh%"=="true" goto :Arm32Ssh From 7f17d2961beb58e37b8926e754da9c96e1bad713 Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Tue, 21 May 2019 18:08:26 -0700 Subject: [PATCH 03/18] 100% test pass when manually running test.bat --- Lib/test/test_math.py | 2 ++ Lib/test/test_ssl.py | 4 ++++ Tools/buildbot/remoteDeploy.bat | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 853a0e62f82351..e7df2d425ebe70 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -465,6 +465,8 @@ def testCos(self): self.assertRaises(ValueError, math.cos, NINF) self.assertTrue(math.isnan(math.cos(NAN))) + @unittest.skipIf(sys.platform=='win32' and (platform.machine()=='ARM' or platform.machine()=='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) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index d48d6e5569fc3e..f9a2e62122a649 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -25,6 +25,7 @@ ssl = support.import_module("ssl") +Py_DEBUG = hasattr(sys, 'gettotalrefcount') PROTOCOLS = sorted(ssl._PROTOCOL_NAMES) HOST = support.HOST @@ -1345,6 +1346,7 @@ def test_load_verify_cadata(self): ctx.load_verify_locations(cadata=b"broken") + @unittest.skipIf(Py_DEBUG, "Crashes on debug python builds") def test_load_dh_params(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) ctx.load_dh_params(DHFILE) @@ -1645,6 +1647,7 @@ def test_str(self): self.assertEqual(str(e), "foo") self.assertEqual(e.errno, 1) + @unittest.skipIf(Py_DEBUG, "Crashes on debug python builds") def test_lib_reason(self): # Test the library and reason attributes ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) @@ -3825,6 +3828,7 @@ def test_compression_disabled(self): sni_name=hostname) self.assertIs(stats['compression'], None) + @unittest.skipIf(Py_DEBUG, "Crashes on debug python builds") def test_dh_params(self): # Check we can get a connection with ephemeral Diffie-Hellman client_context, server_context, hostname = testing_context() diff --git a/Tools/buildbot/remoteDeploy.bat b/Tools/buildbot/remoteDeploy.bat index 0ada7d570b7b0f..f05c01274e0154 100644 --- a/Tools/buildbot/remoteDeploy.bat +++ b/Tools/buildbot/remoteDeploy.bat @@ -22,6 +22,8 @@ if "%REMOTE_PYTHON_DIR%"=="" (set REMOTE_PYTHON_DIR=C:\python\) %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" @@ -29,6 +31,8 @@ for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.pyd /b`) do @%SCP% 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% "%PYTHON_SOURCE%Modules\Setup" "%REMOTE_PYTHON_DIR%Modules" +%SCP% "%PYTHON_SOURCE%PC\pyconfig.h" "%REMOTE_PYTHON_DIR%PC" exit /b 0 From 9aaa2c4d18373a76038b1e714069d5f0c205733a Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Wed, 22 May 2019 14:37:19 -0700 Subject: [PATCH 04/18] fix file destination --- Tools/buildbot/remoteDeploy.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/buildbot/remoteDeploy.bat b/Tools/buildbot/remoteDeploy.bat index f05c01274e0154..d7096652281daa 100644 --- a/Tools/buildbot/remoteDeploy.bat +++ b/Tools/buildbot/remoteDeploy.bat @@ -31,8 +31,8 @@ for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.pyd /b`) do @%SCP% 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% "%PYTHON_SOURCE%Modules\Setup" "%REMOTE_PYTHON_DIR%Modules" -%SCP% "%PYTHON_SOURCE%PC\pyconfig.h" "%REMOTE_PYTHON_DIR%PC" +%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 0 From 3f38d18a5d47cb4858fdd06fa27288d1f96b4b51 Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Thu, 23 May 2019 11:22:30 -0700 Subject: [PATCH 05/18] only skip ssl tests on Windows IoT --- Lib/test/test_ssl.py | 7 ++++--- Tools/buildbot/remoteDeploy.bat | 1 + Tools/buildbot/remotePythonInfo.bat | 5 ++++- Tools/buildbot/test.bat | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index f9a2e62122a649..384088f1c17cad 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -26,6 +26,7 @@ ssl = support.import_module("ssl") Py_DEBUG = hasattr(sys, 'gettotalrefcount') +Py_DEBUG_Win32_IoT = Py_DEBUG and platform.win32_is_iot() PROTOCOLS = sorted(ssl._PROTOCOL_NAMES) HOST = support.HOST @@ -1346,7 +1347,7 @@ def test_load_verify_cadata(self): ctx.load_verify_locations(cadata=b"broken") - @unittest.skipIf(Py_DEBUG, "Crashes on debug python builds") + @unittest.skipIf(sys.platform=='win32' and '' and Py_DEBUG_Win32_IoT, "Crashes on debug builds on Windows IoT") def test_load_dh_params(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) ctx.load_dh_params(DHFILE) @@ -1647,7 +1648,7 @@ def test_str(self): self.assertEqual(str(e), "foo") self.assertEqual(e.errno, 1) - @unittest.skipIf(Py_DEBUG, "Crashes on debug python builds") + @unittest.skipIf(Py_DEBUG_Win32_IoT, "Crashes on debug builds on Windows IoT") def test_lib_reason(self): # Test the library and reason attributes ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) @@ -3828,7 +3829,7 @@ def test_compression_disabled(self): sni_name=hostname) self.assertIs(stats['compression'], None) - @unittest.skipIf(Py_DEBUG, "Crashes on debug python builds") + @unittest.skipIf(Py_DEBUG_Win32_IoT, "Crashes on debug builds on Windows IoT") def test_dh_params(self): # Check we can get a connection with ephemeral Diffie-Hellman client_context, server_context, hostname = testing_context() diff --git a/Tools/buildbot/remoteDeploy.bat b/Tools/buildbot/remoteDeploy.bat index d7096652281daa..b6eb03fe3520e5 100644 --- a/Tools/buildbot/remoteDeploy.bat +++ b/Tools/buildbot/remoteDeploy.bat @@ -19,6 +19,7 @@ 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" diff --git a/Tools/buildbot/remotePythonInfo.bat b/Tools/buildbot/remotePythonInfo.bat index daf575e204520c..854490bd2c60b6 100644 --- a/Tools/buildbot/remotePythonInfo.bat +++ b/Tools/buildbot/remotePythonInfo.bat @@ -5,8 +5,11 @@ 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=c:\python\pcbuild\arm32) & shift & goto 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 diff --git a/Tools/buildbot/test.bat b/Tools/buildbot/test.bat index 7a8bead8d3cd37..4a56673a500c71 100644 --- a/Tools/buildbot/test.bat +++ b/Tools/buildbot/test.bat @@ -27,6 +27,7 @@ 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\) +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 From 4e147de6e5edd9a8177b41056fd87a1f09453818 Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Thu, 23 May 2019 11:38:54 -0700 Subject: [PATCH 06/18] Avoid mixing debug/release CRT on Windows --- Lib/test/test_ssl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 384088f1c17cad..25c0af75161a8f 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -26,7 +26,7 @@ ssl = support.import_module("ssl") Py_DEBUG = hasattr(sys, 'gettotalrefcount') -Py_DEBUG_Win32_IoT = Py_DEBUG and platform.win32_is_iot() +Py_DEBUG_Win32 = Py_DEBUG and platform.win32_is_iot() PROTOCOLS = sorted(ssl._PROTOCOL_NAMES) HOST = support.HOST @@ -1347,7 +1347,7 @@ def test_load_verify_cadata(self): ctx.load_verify_locations(cadata=b"broken") - @unittest.skipIf(sys.platform=='win32' and '' and Py_DEBUG_Win32_IoT, "Crashes on debug builds on Windows IoT") + @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) @@ -1648,7 +1648,7 @@ def test_str(self): self.assertEqual(str(e), "foo") self.assertEqual(e.errno, 1) - @unittest.skipIf(Py_DEBUG_Win32_IoT, "Crashes on debug builds on Windows IoT") + @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) @@ -3829,7 +3829,7 @@ def test_compression_disabled(self): sni_name=hostname) self.assertIs(stats['compression'], None) - @unittest.skipIf(Py_DEBUG_Win32_IoT, "Crashes on debug builds on Windows IoT") + @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() From 98196475c888607210ac5d4dc3b2b826d71816e1 Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Thu, 23 May 2019 11:41:15 -0700 Subject: [PATCH 07/18] test for win32 --- Lib/test/test_ssl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 25c0af75161a8f..8ff579aefb4d77 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -26,7 +26,7 @@ ssl = support.import_module("ssl") Py_DEBUG = hasattr(sys, 'gettotalrefcount') -Py_DEBUG_Win32 = Py_DEBUG and platform.win32_is_iot() +Py_DEBUG_Win32 = Py_DEBUG and sys.platform=='win32' PROTOCOLS = sorted(ssl._PROTOCOL_NAMES) HOST = support.HOST From 365701c50a1fb21cdc50ce7bffe85d9fbf31f76e Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Thu, 23 May 2019 12:58:43 -0700 Subject: [PATCH 08/18] propagate exit code --- Tools/buildbot/test.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/buildbot/test.bat b/Tools/buildbot/test.bat index 4a56673a500c71..031483492463ed 100644 --- a/Tools/buildbot/test.bat +++ b/Tools/buildbot/test.bat @@ -20,7 +20,7 @@ if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts 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 +exit /b %ERRORLEVEL% :Arm32Ssh set dashU=-unetwork,decimal,subprocess,urlfetch,tzdata @@ -33,7 +33,7 @@ set TEMP_ARGS=--temp %REMOTE_PYTHON_DIR%temp 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 +exit /b %ERRORLEVEL% :Arm32SshHelp echo SSH_SERVER environment variable must be set to administrator@[ip address] From 69c40d71d0603ba8145eb1db5b003a588ee96f1e Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Thu, 23 May 2019 14:56:24 -0700 Subject: [PATCH 09/18] fix 2 more exit 0 calls --- Tools/buildbot/remoteDeploy.bat | 2 +- Tools/buildbot/remotePythonInfo.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/buildbot/remoteDeploy.bat b/Tools/buildbot/remoteDeploy.bat index b6eb03fe3520e5..abfee139b45c1f 100644 --- a/Tools/buildbot/remoteDeploy.bat +++ b/Tools/buildbot/remoteDeploy.bat @@ -35,7 +35,7 @@ for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.dll /b`) do @%SCP% PCBuild\arm32\ %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 0 +exit /b %ERRORLEVEL% :Arm32SshHelp echo SSH_SERVER environment variable must be set to administrator@[ip address] diff --git a/Tools/buildbot/remotePythonInfo.bat b/Tools/buildbot/remotePythonInfo.bat index 854490bd2c60b6..263808cfddfd40 100644 --- a/Tools/buildbot/remotePythonInfo.bat +++ b/Tools/buildbot/remotePythonInfo.bat @@ -22,7 +22,7 @@ if "%SSH%"=="" if EXIST %WINDIR%\System32\OpenSSH\ssh.exe (set SSH=%WINDIR%\Syst set PYTHON_EXE=%prefix%\python%suffix%.exe echo on %SSH% %SSH_SERVER% %PYTHON_EXE% -m test.pythoninfo -exit /b 0 +exit /b %ERRORLEVEL% :Arm32SshHelp echo SSH_SERVER environment variable must be set to administrator@[ip address] From 086a1b9dd9c1f4f2d8924c20a6c97dd961e00fcd Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Thu, 23 May 2019 17:15:49 -0700 Subject: [PATCH 10/18] fixes for test_regrtest --- Lib/test/test_regrtest.py | 12 ++++++++---- Tools/buildbot/remoteDeploy.bat | 3 +++ Tools/buildbot/test.bat | 2 ++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index 9155522c273d88..1d1085a137412c 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -616,8 +616,10 @@ def test_tools_buildbot_test(self): # 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': - test_args.append('-x64') # 64-bit build + if platform.machine() == 'AMD64': + test_args.append('-x64') # 64-bit Intel build + if platform.machine() == 'ARM': + test_args.append('-arm32') # 32-bit ARM build if not Py_DEBUG: test_args.append('+d') # Release build, use python.exe self.run_batch(script, *test_args, *self.tests) @@ -629,8 +631,10 @@ def test_pcbuild_rt(self): 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': - rt_args.append('-x64') # 64-bit build + if platform.machine() == 'AMD64': + rt_args.append('-x64') # 64-bit Intel build + if platform.machine() == 'ARM': + rt_args.append('-arm32') # 32-bit ARM build if Py_DEBUG: rt_args.append('-d') # Debug build, use python_d.exe self.run_batch(script, *rt_args, *self.regrtest_args, *self.tests) diff --git a/Tools/buildbot/remoteDeploy.bat b/Tools/buildbot/remoteDeploy.bat index abfee139b45c1f..310f016f738ef6 100644 --- a/Tools/buildbot/remoteDeploy.bat +++ b/Tools/buildbot/remoteDeploy.bat @@ -25,6 +25,7 @@ if NOT "%REMOTE_PYTHON_DIR:~-1,1%"=="\" (set REMOTE_PYTHON_DIR=%REMOTE_PYTHON_DI %SSH% %SSH_SERVER% "md %REMOTE_PYTHON_DIR%temp" %SSH% %SSH_SERVER% "md %REMOTE_PYTHON_DIR%Modules" %SSH% %SSH_SERVER% "md %REMOTE_PYTHON_DIR%PC" +%SSH% %SSH_SERVER% "md %REMOTE_PYTHON_DIR%Tools" 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" @@ -32,6 +33,8 @@ for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.pyd /b`) do @%SCP% 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\buildbot" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Tools\buildbot" +%SCP% -r "%PYTHON_SOURCE%Tools\scripts" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Tools\scripts" %SCP% "%PYTHON_SOURCE%Modules\Setup" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Modules" %SCP% "%PYTHON_SOURCE%PC\pyconfig.h" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PC" diff --git a/Tools/buildbot/test.bat b/Tools/buildbot/test.bat index 031483492463ed..3c5a0a76a6524f 100644 --- a/Tools/buildbot/test.bat +++ b/Tools/buildbot/test.bat @@ -17,8 +17,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 "%arm32_ssh%"=="true" goto NativeExecution if "%arm32_ssh%"=="true" goto :Arm32Ssh +:NativeExecution call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW --slowest --timeout=1200 --fail-env-changed %regrtest_args% exit /b %ERRORLEVEL% From e230795a4d36600e051f08c10c641662b6cec8d3 Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Fri, 24 May 2019 10:21:18 -0700 Subject: [PATCH 11/18] add tools/parser for test_tools --- Tools/buildbot/remoteDeploy.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools/buildbot/remoteDeploy.bat b/Tools/buildbot/remoteDeploy.bat index 310f016f738ef6..393e9e96c13ff1 100644 --- a/Tools/buildbot/remoteDeploy.bat +++ b/Tools/buildbot/remoteDeploy.bat @@ -34,6 +34,7 @@ for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.dll /b`) do @%SCP% 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\buildbot" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Tools\buildbot" +%SCP% -r "%PYTHON_SOURCE%Tools\parser" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Tools\parser" %SCP% -r "%PYTHON_SOURCE%Tools\scripts" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Tools\scripts" %SCP% "%PYTHON_SOURCE%Modules\Setup" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Modules" %SCP% "%PYTHON_SOURCE%PC\pyconfig.h" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PC" From 1a1f12dc33f5c4fc58d6eacbcb6995c0349a4adb Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Fri, 24 May 2019 10:52:57 -0700 Subject: [PATCH 12/18] copy entire Tools directory --- Tools/buildbot/remoteDeploy.bat | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Tools/buildbot/remoteDeploy.bat b/Tools/buildbot/remoteDeploy.bat index 393e9e96c13ff1..ac1e38b9617c94 100644 --- a/Tools/buildbot/remoteDeploy.bat +++ b/Tools/buildbot/remoteDeploy.bat @@ -25,7 +25,6 @@ if NOT "%REMOTE_PYTHON_DIR:~-1,1%"=="\" (set REMOTE_PYTHON_DIR=%REMOTE_PYTHON_DI %SSH% %SSH_SERVER% "md %REMOTE_PYTHON_DIR%temp" %SSH% %SSH_SERVER% "md %REMOTE_PYTHON_DIR%Modules" %SSH% %SSH_SERVER% "md %REMOTE_PYTHON_DIR%PC" -%SSH% %SSH_SERVER% "md %REMOTE_PYTHON_DIR%Tools" 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" @@ -33,9 +32,7 @@ for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.pyd /b`) do @%SCP% 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\buildbot" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Tools\buildbot" -%SCP% -r "%PYTHON_SOURCE%Tools\parser" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Tools\parser" -%SCP% -r "%PYTHON_SOURCE%Tools\scripts" "%SSH_SERVER%:%REMOTE_PYTHON_DIR%Tools\scripts" +%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" From 29601d838b3b95dfc2956f7fa4ea6790553b989d Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Fri, 24 May 2019 11:01:59 -0700 Subject: [PATCH 13/18] skip check on Windows ARM32 --- Lib/test/test_pyexpat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_pyexpat.py b/Lib/test/test_pyexpat.py index 92fffc45f30a96..082d85a3d2b945 100644 --- a/Lib/test/test_pyexpat.py +++ b/Lib/test/test_pyexpat.py @@ -3,6 +3,7 @@ from io import BytesIO import os +import platform import sys import sysconfig import unittest @@ -465,7 +466,7 @@ def test_exception(self): "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]) From 786194d509f3923a9d39ffe353ad9bba521c51e2 Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Fri, 24 May 2019 11:40:59 -0700 Subject: [PATCH 14/18] restore 64-bit check in test_regrtest --- Lib/test/test_regrtest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index 1d1085a137412c..c17a72027f0bb5 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -616,10 +616,10 @@ def test_tools_buildbot_test(self): # Tools\buildbot\test.bat script = os.path.join(ROOT_DIR, 'Tools', 'buildbot', 'test.bat') test_args = ['--testdir=%s' % self.tmptestdir] - if platform.machine() == 'AMD64': - test_args.append('-x64') # 64-bit Intel build if platform.machine() == 'ARM': test_args.append('-arm32') # 32-bit ARM 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 self.run_batch(script, *test_args, *self.tests) @@ -631,10 +631,10 @@ def test_pcbuild_rt(self): 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.machine() == 'AMD64': - rt_args.append('-x64') # 64-bit Intel build if 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: rt_args.append('-d') # Debug build, use python_d.exe self.run_batch(script, *rt_args, *self.regrtest_args, *self.tests) From f5c917a70ae251764664b5e5cd3963388aa82db0 Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Wed, 19 Jun 2019 11:16:04 -0700 Subject: [PATCH 15/18] Update Lib/test/test_math.py Co-Authored-By: Steve Dower --- Lib/test/test_math.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index e546d0021c3bde..6aa6dd7f4b085e 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -468,7 +468,7 @@ def testCos(self): self.assertRaises(ValueError, math.cos, NINF) self.assertTrue(math.isnan(math.cos(NAN))) - @unittest.skipIf(sys.platform=='win32' and (platform.machine()=='ARM' or platform.machine()=='ARM64'), + @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) From e2fb14b56735cc2244be5c1d3bb71542dff1efdd Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Wed, 19 Jun 2019 11:16:20 -0700 Subject: [PATCH 16/18] Update Lib/test/test_ssl.py Co-Authored-By: Steve Dower --- Lib/test/test_ssl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index c7f4d805978641..857b54df857635 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -29,7 +29,7 @@ from ssl import TLSVersion, _TLSContentType, _TLSMessageType, _TLSAlertType Py_DEBUG = hasattr(sys, 'gettotalrefcount') -Py_DEBUG_Win32 = Py_DEBUG and sys.platform=='win32' +Py_DEBUG_WIN32 = Py_DEBUG and sys.platform == 'win32' PROTOCOLS = sorted(ssl._PROTOCOL_NAMES) HOST = support.HOST From 5c355abd99c52957645350f5418900d1124339ec Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Wed, 19 Jun 2019 11:45:46 -0700 Subject: [PATCH 17/18] fix mismatched paren --- Lib/test/test_math.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 8978f55803f689..362d09370d4522 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -468,7 +468,7 @@ def testCos(self): self.assertRaises(ValueError, math.cos, NINF) self.assertTrue(math.isnan(math.cos(NAN))) - @unittest.skipIf(sys.platform == 'win32' and platform.machine() in ('ARM', 'ARM64')), + @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) From f1ce1bf7756bcf74a041bc441cc37836a26cca48 Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Wed, 19 Jun 2019 11:54:41 -0700 Subject: [PATCH 18/18] fix Py_DEBUG_WIN32 spelling --- Lib/test/test_ssl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 857b54df857635..c72a85710d5cb8 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1350,7 +1350,7 @@ def test_load_verify_cadata(self): ctx.load_verify_locations(cadata=b"broken") - @unittest.skipIf(Py_DEBUG_Win32, "Avoid mixing debug/release CRT on Windows") + @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) @@ -1669,7 +1669,7 @@ def test_str(self): self.assertEqual(str(e), "foo") self.assertEqual(e.errno, 1) - @unittest.skipIf(Py_DEBUG_Win32, "Avoid mixing debug/release CRT on Windows") + @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) @@ -3850,7 +3850,7 @@ def test_compression_disabled(self): sni_name=hostname) self.assertIs(stats['compression'], None) - @unittest.skipIf(Py_DEBUG_Win32, "Avoid mixing debug/release CRT on Windows") + @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() @@ -4446,7 +4446,7 @@ def keylog_lines(self, fname=support.TESTFN): return len(list(f)) @requires_keylog - @unittest.skipIf(Py_DEBUG_Win32, "Avoid mixing debug/release CRT on Windows") + @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) @@ -4470,7 +4470,7 @@ def test_keylog_defaults(self): ctx.keylog_filename = 1 @requires_keylog - @unittest.skipIf(Py_DEBUG_Win32, "Avoid mixing debug/release CRT on Windows") + @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() @@ -4508,7 +4508,7 @@ def test_keylog_filename(self): @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") + @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): pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy