Skip to content

Commit 44888e6

Browse files
committed
* fix Windows build -> Logs
1 parent 4f87966 commit 44888e6

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/scripts/windows/test_task.bat

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,22 @@ if "%ASAN%" equ "1" set ASAN_OPTS=--asan
151151
mkdir c:\tests_tmp
152152

153153
echo Testing PHP executable...
154-
%PHP_BUILD_DIR%\php.exe --version
155-
if %errorlevel% neq 0 (
156-
echo PHP executable failed to start!
157-
exit /b 1
154+
155+
echo Trying to run PHP...
156+
%PHP_BUILD_DIR%\php.exe --version 2>&1
157+
set PHP_EXIT_CODE=%errorlevel%
158+
echo PHP exit code: %PHP_EXIT_CODE%
159+
160+
if %PHP_EXIT_CODE% neq 0 (
161+
echo PHP failed! Checking what went wrong...
162+
163+
echo Checking recent Application Event Log errors...
164+
powershell -Command "Get-WinEvent -FilterHashtable @{LogName='Application'; Level=2; StartTime=(Get-Date).AddMinutes(-1)} -MaxEvents 5 -ErrorAction SilentlyContinue | Select-Object TimeCreated, Id, LevelDisplayName, Message"
165+
166+
echo Checking DLL dependencies...
167+
dumpbin /dependents %PHP_BUILD_DIR%\php.exe
168+
169+
exit /b %PHP_EXIT_CODE%
158170
)
159171

160172
echo Running async extension tests...

0 commit comments

Comments
 (0)