Skip to content

Commit 922f1a0

Browse files
committed
Backport changes for OpenSSL 1.1.1 CI integration
Add debug message for failing test parts (cherry picked from commit a45169a) Show all unmatched errors when test failed (cherry picked from commit 7015965) More possibly colliding libs to remove from the test image (cherry picked from commit 3008ad1) Remove colliding file from CI image (cherry picked from commit 6220d21) Fix typo (cherry picked from commit 24517d8)
1 parent 05a4fec commit 922f1a0

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

appveyor/build_task.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw-w64 >NUL 2>NUL
1010
if %errorlevel% neq 0 exit /b 3
1111
if "%APPVEYOR%" equ "True" rmdir /s /q C:\msys64 >NUL 2>NUL
1212
if %errorlevel% neq 0 exit /b 3
13+
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win32 >NUL 2>NUL
14+
if %errorlevel% neq 0 exit /b 3
15+
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win64 >NUL 2>NUL
16+
if %errorlevel% neq 0 exit /b 3
17+
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win32 >NUL 2>NUL
18+
if %errorlevel% neq 0 exit /b 3
19+
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win64 >NUL 2>NUL
20+
if %errorlevel% neq 0 exit /b 3
21+
if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL
22+
if %errorlevel% neq 0 exit /b 3
23+
if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL
24+
if %errorlevel% neq 0 exit /b 3
1325

1426
cd /D %APPVEYOR_BUILD_FOLDER%
1527
if %errorlevel% neq 0 exit /b 3

ext/openssl/tests/openssl_error_string_basic.phpt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ openssl_error_string() tests
77
// helper function to check openssl errors
88
function expect_openssl_errors($name, $expected_error_codes) {
99
$expected_errors = array_fill_keys($expected_error_codes, false);
10+
$all_errors = array();
1011
while (($error_string = openssl_error_string()) !== false) {
1112
if (preg_match(",.+:([0-9A-F]+):.+,", $error_string, $m) > 0) {
1213
$error_code = $m[1];
1314
if (isset($expected_errors[$error_code])) {
1415
$expected_errors[$error_code] = true;
1516
}
16-
}
17+
$all_errors[$error_code] = $error_string;
18+
} else {
19+
$all_errors[] = $error_string;
20+
}
1721
}
1822

1923
$fail = false;
@@ -26,6 +30,13 @@ function expect_openssl_errors($name, $expected_error_codes) {
2630

2731
if (!$fail) {
2832
echo "$name: ok\n";
33+
} else {
34+
echo "$name: uncaught errors\n";
35+
foreach ($all_errors as $code => $str) {
36+
if (!isset($expected_errors[$code]) || !$expected_errors[$code]) {
37+
echo "\t", $code, ": ", $str, "\n";
38+
}
39+
}
2940
}
3041
}
3142

0 commit comments

Comments
 (0)