summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-09-12 19:59:20 +0200
committerAnatol Belski <ab@php.net>2018-09-13 11:03:42 +0200
commit922f1a0dcf5de2796b2312e74b76091383773fc9 (patch)
treefc0551a0cb56d785f0ac3749ed9b4212abaca1f1
parent05a4fec76119696ec50b920ec783cca5e6eca31c (diff)
downloadphp-git-922f1a0dcf5de2796b2312e74b76091383773fc9.tar.gz
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)
-rw-r--r--appveyor/build_task.bat12
-rw-r--r--ext/openssl/tests/openssl_error_string_basic.phpt13
2 files changed, 24 insertions, 1 deletions
diff --git a/appveyor/build_task.bat b/appveyor/build_task.bat
index 869340401d..ede3fd2eb4 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 af8f81f842..b52658aca4 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";
+ }
+ }
}
}