com php-src: Backport changes for OpenSSL 1.1.1 CI integration: appveyor/build_task.bat ext/openssl/tests/openssl_error _string_basic.phpt

From: Date: Thu, 13 Sep 2018 09:03:42 +0000
Subject: com php-src: Backport changes for OpenSSL 1.1.1 CI integration: appveyor/build_task.bat ext/openssl/tests/openssl_error _string_basic.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-103095@lists.php.net to get a copy of this message
Commit: 922f1a0dcf5de2796b2312e74b76091383773fc9 Author: Anatol Belski <ab@php.net> Wed, 12 Sep 2018 19:59:20 +0200 Parents: 05a4fec76119696ec50b920ec783cca5e6eca31c Branches: PHP-7.2 PHP-7.3 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=922f1a0dcf5de2796b2312e74b76091383773fc9 Log: Backport changes for OpenSSL 1.1.1 CI integration Add debug message for failing test parts (cherry picked from commit a45169a6ba54b13484d70cb474679c96347f779b) Show all unmatched errors when test failed (cherry picked from commit 70159652541c62b5f3bbb26da76b7e56987b2544) More possibly colliding libs to remove from the test image (cherry picked from commit 3008ad1a49210e4604522a987cbdd27a5a0a2c42) Remove colliding file from CI image (cherry picked from commit 6220d21c3420ff0d7366d410920ba5279fba3893) Fix typo (cherry picked from commit 24517d82cf8dc708d08bc77435ad418de4bdff4e) Changed paths: M appveyor/build_task.bat M ext/openssl/tests/openssl_error_string_basic.phpt Diff: diff --git a/appveyor/build_task.bat b/appveyor/build_task.bat index 8693404..ede3fd2 100644 --- a/appveyor/build_task.bat +++ b/appveyor/build_task.bat @@ -10,6 +10,18 @@ if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw-w64 >NUL 2>NUL if %errorlevel% neq 0 exit /b 3 if "%APPVEYOR%" equ "True" rmdir /s /q C:\msys64 >NUL 2>NUL if %errorlevel% neq 0 exit /b 3 +if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win32 >NUL 2>NUL +if %errorlevel% neq 0 exit /b 3 +if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win64 >NUL 2>NUL +if %errorlevel% neq 0 exit /b 3 +if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win32 >NUL 2>NUL +if %errorlevel% neq 0 exit /b 3 +if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win64 >NUL 2>NUL +if %errorlevel% neq 0 exit /b 3 +if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL +if %errorlevel% neq 0 exit /b 3 +if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL +if %errorlevel% neq 0 exit /b 3 cd /D %APPVEYOR_BUILD_FOLDER% if %errorlevel% neq 0 exit /b 3 diff --git a/ext/openssl/tests/openssl_error_string_basic.phpt b/ext/openssl/tests/openssl_error_string_basic.phpt index af8f81f..b52658a 100644 --- a/ext/openssl/tests/openssl_error_string_basic.phpt +++ b/ext/openssl/tests/openssl_error_string_basic.phpt @@ -7,13 +7,17 @@ openssl_error_string() tests // helper function to check openssl errors function expect_openssl_errors($name, $expected_error_codes) { $expected_errors = array_fill_keys($expected_error_codes, false); + $all_errors = array(); while (($error_string = openssl_error_string()) !== false) { if (preg_match(",.+:([0-9A-F]+):.+,", $error_string, $m) > 0) { $error_code = $m[1]; if (isset($expected_errors[$error_code])) { $expected_errors[$error_code] = true; } - } + $all_errors[$error_code] = $error_string; + } else { + $all_errors[] = $error_string; + } } $fail = false; @@ -26,6 +30,13 @@ function expect_openssl_errors($name, $expected_error_codes) { if (!$fail) { echo "$name: ok\n"; + } else { + echo "$name: uncaught errors\n"; + foreach ($all_errors as $code => $str) { + if (!isset($expected_errors[$code]) || !$expected_errors[$code]) { + echo "\t", $code, ": ", $str, "\n"; + } + } } }

« previous php.cvs (#103095) next »