Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d2aedbe
Better ci tests logging for windows
rasapala May 8, 2026
3b8c415
Add pytest
rasapala May 8, 2026
b83a890
Merge branch 'main' into win_ci_tests
rasapala May 11, 2026
1f0ce10
Test FAILED
rasapala May 11, 2026
2c79486
Potential fix for pull request finding
rasapala May 12, 2026
4f7db77
Code review
rasapala May 12, 2026
ae82aba
Merge branch 'win_ci_tests' of https://github.com/IntelAI/OpenVINO-mo…
rasapala May 12, 2026
dd7572e
Fixes and segfault test
rasapala May 12, 2026
255eb0d
Style
rasapala May 12, 2026
c691928
Fix detection
rasapala May 12, 2026
4bf71d2
Fix seg detection
rasapala May 12, 2026
0a852cd
Parsing script
rasapala May 12, 2026
775daa6
Spellings
rasapala May 12, 2026
3a944bc
Add to summary
rasapala May 12, 2026
0177a7f
Fix spell
rasapala May 13, 2026
d275584
Better seh reporting
rasapala May 13, 2026
5951305
Fix this
rasapala May 13, 2026
87a4b99
Spell
rasapala May 13, 2026
21e55da
Remove failures
rasapala May 13, 2026
73cd971
Merge branch 'main' into win_ci_tests
rasapala May 13, 2026
c92914e
Update spelling-whitelist.txt
rasapala May 13, 2026
f7b212b
Fix detection
rasapala May 13, 2026
3ad029f
Spell
rasapala May 13, 2026
f87876e
Fix ci check and log
rasapala May 14, 2026
8dcb633
Fix groovy
rasapala May 14, 2026
a96911e
test FAILED
rasapala May 14, 2026
2b83d0d
Fix ci
rasapala May 14, 2026
a33f3be
Spell
rasapala May 14, 2026
3344875
Fix logs
rasapala May 14, 2026
0c653ea
Test segfault
rasapala May 14, 2026
4404be2
Fix detection
rasapala May 14, 2026
864b96d
Add fix
rasapala May 15, 2026
c2aef19
Merge branch 'main' into win_ci_tests
rasapala May 15, 2026
b7668b7
Remove segfault
rasapala May 15, 2026
7d0ed27
No duplicates
rasapala May 15, 2026
70b16d0
Fix
rasapala May 15, 2026
1bee655
Fix spell
rasapala May 15, 2026
78ff480
Test fail and seh
rasapala May 15, 2026
fe3ad83
Fix groovy
rasapala May 15, 2026
9ebbf95
Clean pass
rasapala May 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/build_test_OnCommit.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ pipeline {
windows.setup_bazel_remote_cache()
windows.install_dependencies()
windows.unit_test()
windows.check_tests()
} finally {
windows.archive_test_artifacts()
}
Expand Down
1 change: 0 additions & 1 deletion ci/build_test_OnCommitWin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pipeline {
windows.clean()
windows.build()
windows.unit_test()
windows.check_tests()
if (env.USE_BRANCH_NAME_IN_PACKAGE_NAME == "true") {
def safeBranchName = env.BRANCH_NAME.replaceAll('/', '_')
tag = "${safeBranchName}-${env.CUSTOM_TAG}"
Expand Down
1 change: 0 additions & 1 deletion ci/build_test_release.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pipeline {
windows.clean()
windows.build()
windows.unit_test()
windows.check_tests()
def safeBranchName = env.BRANCH_NAME.replaceAll('/', '_')
def python_presence = ""
if (env.OVMS_PYTHON_ENABLED == "1") {
Expand Down
116 changes: 68 additions & 48 deletions ci/loadWin.groovy

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions spelling-whitelist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,11 @@ demos/vlm_npu/README.md:157: mane ==> main, many, maine
demos/vlm_npu/README.md:218: mane ==> main, many, maine
demos/integration_with_OpenWebUI/README.md:423: Buildin ==> Building, Build in
src/test/llm/output_parsers/lfm2_output_parser_test.cpp
windows_parse_tests.bat:35: seh ==> she
windows_parse_tests.bat:119: SEH ==> SHE
windows_parse_tests.bat:123: SEH ==> SHE
windows_parse_tests.bat:134: SEH ==> SHE
windows_parse_tests.bat:136: SEH ==> SHE
windows_parse_tests.bat:141: SEH ==> SHE
windows_parse_tests.bat:144: SEH ==> SHE
src/test/llm/output_parsers/gemma4_output_parser_test.cpp
1 change: 0 additions & 1 deletion src/test/schema_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,6 @@ TEST(SchemaTest, ModelConfigPluginConfigPositive) {
}
]
})";

rapidjson::Document modelConfigSeqNegativeDoc;
modelConfigSeqNegativeDoc.Parse(modelConfigTimeoutNegative);
auto result = ovms::validateJsonAgainstSchema(modelConfigSeqNegativeDoc, ovms::MODELS_CONFIG_SCHEMA.c_str());
Expand Down
2 changes: 1 addition & 1 deletion windows_install_build_dependencies.bat
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ if !errorlevel! neq 0 exit /b !errorlevel!
%python_path%\python.exe -m pip install --upgrade pip
if !errorlevel! neq 0 exit /b !errorlevel!
:: setuptools<60.0 required for numpy1.23 on python311 to install
%python_path%\python.exe -m pip install "numpy==2.2.5" "Jinja2==3.1.6" "MarkupSafe==3.0.2"
%python_path%\python.exe -m pip install "numpy==2.2.5" "Jinja2==3.1.6" "MarkupSafe==3.0.2" "pytest==8.3.5"
if !errorlevel! neq 0 exit /b !errorlevel!
echo [INFO] Python %python_version% installed: %python_path%
goto install_curl
Expand Down
168 changes: 168 additions & 0 deletions windows_parse_tests.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
::
:: Copyright (c) 2026 Intel Corporation
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
:: http:::www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
::
@echo off
setlocal EnableExtensions EnableDelayedExpansion

set "fullLog=%~1"
set "summaryLog=%~2"
if not defined fullLog set "fullLog=win_full_test.log"
if not defined summaryLog set "summaryLog=win_test_summary.log"

if not exist "!fullLog!" (
echo [ERROR] Full test log not found: !fullLog!
exit /b 1
)
if not exist "!summaryLog!" (
echo [WARN] Summary log not found: !summaryLog!
)

set "parserOutputTmp=!summaryLog!.parse.tmp"
set "summaryBackupTmp=!summaryLog!.orig.tmp"

set "CRASH_PATTERN=segmentation fault\|segfault\|abnormal termination\|access violation\|sigsegv\|seh exception\|0xc0000005\|unknown file: error:"
set "FAILED_TEST_PATTERN=^\[ FAILED \].*([0-9][0-9]* ms)$"

:: Check for per-test FAILED markers first - do not allow PASSED text to mask test failures
:: Match only timed gtest FAILED lines to avoid duplicates from the final "listed below" section.
grep -a -q "%FAILED_TEST_PATTERN%" "%fullLog%"
if !errorlevel! equ 0 goto :exit_build_error

:: Also check for segmentation faults or crashes
grep -a -q -i "%CRASH_PATTERN%" "%fullLog%"
if !errorlevel! equ 0 goto :exit_build_error

:: Consider the run successful only if the global PASSED summary is present anywhere in the log
:: (it can appear hundreds of lines before EOF due to SKIPPED and debug trace lines following it)
grep -a -q "\[ PASSED \] [0-9]" "%fullLog%"
if !errorlevel! equ 0 exit /b 0

:: If we reach here, tests did not complete correctly (no FAILED/crash marker but no final PASSED summary)
goto :exit_build_error

:exit_build_error
if exist "%parserOutputTmp%" del /f /q "%parserOutputTmp%"
if exist "%summaryBackupTmp%" del /f /q "%summaryBackupTmp%"

set "segfaultDetected=0"
grep -a -q -i "%CRASH_PATTERN%" "!fullLog!"
if !errorlevel! equ 0 set "segfaultDetected=1"

(
echo.
echo [ERROR] FAILED TESTS OR CRASHES DETECTED:
echo.
echo === Failed Tests ^(from summary/full log^) ===
grep -a "!FAILED_TEST_PATTERN!" "!fullLog!" | awk "!seen[$0]++"
echo.
echo === Last Successful Test ===
grep -a " OK ]" "!fullLog!" | tail -1
echo.
if "!segfaultDetected!"=="1" (
echo === Last Running Test ^(likely the one that failed^) ===
set "lastRunEntry="
for /F "delims=" %%A in ('grep -a "\[ RUN" "!fullLog!" ^| tail -1') do (
set "lastRunEntry=%%A"
)
if defined lastRunEntry (
echo !lastRunEntry!
) else (
echo [WARN] No gtest RUN marker found in !fullLog!.
)
echo.
echo === Output from Last Running Test to End of Log ===
set "lastRunLine="
for /F "tokens=1 delims=:" %%A in ('grep -a -n "\[ RUN" "!fullLog!" ^| tail -1') do (
set "lastRunLine=%%A"
)
if defined lastRunLine (
sed -n "!lastRunLine!,$p" "!fullLog!" | head -120
) else (
echo [WARN] Could not determine last RUN line. Showing recent RUN markers and log tail.
grep -a -n "\[ RUN" "!fullLog!" | tail -3
echo.
tail -20 "!fullLog!"
)
echo.
)
echo === Context Around First FAILED Test ===
set "firstFailedLine="
set "firstFailedRunLine="
for /F "tokens=1 delims=:" %%A in ('grep -a -n "!FAILED_TEST_PATTERN!" "!fullLog!" ^| head -1') do (
set "firstFailedLine=%%A"
)
if defined firstFailedLine (
for /F "tokens=1 delims=:" %%B in ('sed -n "1,!firstFailedLine!p" "!fullLog!" ^| grep -a -n "\[ RUN" ^| tail -1') do (
set "firstFailedRunLine=%%B"
)
if defined firstFailedRunLine (
sed -n "!firstFailedRunLine!,$p" "!fullLog!" | head -160
) else (
echo [WARN] Could not determine RUN line for first FAILED test.
)
) else (
echo [INFO] No per-test FAILED entry with timing found.
)
echo.
echo === SEH/Access Violation Context ===
set "firstSehLine="
set "firstSehRunLine="
set "firstSehRunEntry="
for /F "tokens=1 delims=:" %%A in ('grep -a -n -i "unknown file: error: SEH exception\|0xc0000005\|access violation\|SEH exception" "!fullLog!" ^| head -1') do (
set "firstSehLine=%%A"
)
if defined firstSehLine (
for /F "tokens=1 delims=:" %%B in ('sed -n "1,!firstSehLine!p" "!fullLog!" ^| grep -a -n "\[ RUN" ^| tail -1') do (
set "firstSehRunLine=%%B"
)
for /F "delims=" %%C in ('sed -n "1,!firstSehLine!p" "!fullLog!" ^| grep -a "\[ RUN" ^| tail -1') do (
set "firstSehRunEntry=%%C"
)
if defined firstSehRunEntry (
echo [INFO] Unit test at first SEH marker: !firstSehRunEntry!
) else (
echo [WARN] Could not determine unit test name at first SEH marker.
)
if defined firstSehRunLine (
sed -n "!firstSehRunLine!,$p" "!fullLog!" | head -160
) else (
echo [WARN] Could not determine RUN line for SEH exception entry.
)
) else (
echo [INFO] No SEH/Access Violation entry found.
)
echo.
echo === Segfault/Crash Messages ^(if any^) ===
grep -a -i "%CRASH_PATTERN%\|stack trace" "!fullLog!" || echo ^(none found^)
echo.
echo [ERROR] Check tests summary in '!summaryLog!' and tests logs in '!fullLog!'. Rerun failed test with: windows_setupvars.bat and %cd%\bazel-bin\src\ovms_test.exe --gtest_filter='*.*'
) > "!parserOutputTmp!" 2>&1

if exist "!summaryLog!" (
copy /Y "!summaryLog!" "!summaryBackupTmp!" > nul
) else (
type nul > "!summaryBackupTmp!"
)

(
type "%parserOutputTmp%"
echo.
type "%summaryBackupTmp%"
) > "%summaryLog%"

if exist "!parserOutputTmp!" del /f /q "!parserOutputTmp!"
if exist "!summaryBackupTmp!" del /f /q "!summaryBackupTmp!"

exit /b 1
39 changes: 31 additions & 8 deletions windows_test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ if !errorlevel! neq 0 exit /b !errorlevel!

:: Run install_ovms_service.bat unit tests
echo Running install_ovms_service.bat unit tests...
python -m pytest tests\python\test_install_ovms_service_windows.py -v 2>&1 | tee win_install_service_test.log
if !errorlevel! neq 0 (
python -m pytest tests\python\test_install_ovms_service_windows.py -v > win_install_service_test.log 2>&1
set "pytestExitCode=!errorlevel!"
type win_install_service_test.log
if !pytestExitCode! neq 0 (
echo [ERROR] install_ovms_service.bat unit tests failed. See win_install_service_test.log.
exit /b !errorlevel!
exit /b !pytestExitCode!
)
echo [INFO] install_ovms_service.bat unit tests passed.

Expand All @@ -113,13 +115,34 @@ echo Running: %runTest%
set regex="\[ .* ms"
set sed_clean="s/ (.* ms)//g"
C:\Windows\System32\tar.exe -a -c -f win_test_log.zip win_full_test.log
grep -a %regex% win_full_test.log | sed %sed_clean% > win_test_summary.log
grep -a %regex% win_full_test.log | sed %sed_clean% | grep -q " FAILED "
if !errorlevel! equ 0 goto :exit_build_error
:exit_build

:: Create summary log with filtered results, always create the file even if grep finds no matches
grep -a %regex% win_full_test.log > win_test_summary.tmp
if !errorlevel! equ 0 (
sed %sed_clean% win_test_summary.tmp > win_test_summary.log 2>&1
) else (
echo No matching test results found > win_test_summary.log
)
if exist win_test_summary.tmp del /f /q win_test_summary.tmp

:: Parse logs and decide final test status using dedicated parser script
:: Skip expensive parsing only if PASSED summary exists AND no FAILED markers
grep -a -q "\[ PASSED \] " win_full_test.log
set "hasPassed=!errorlevel!"
grep -a -q "\[ FAILED \] " win_full_test.log
set "hasFailed=!errorlevel!"
if !hasPassed! equ 0 if !hasFailed! neq 0 (
echo [INFO] Tests finished with no failures. Check the summary in win_test_summary.log.
exit /b 0
)
call %cd%\windows_parse_tests.bat win_full_test.log win_test_summary.log
set "parseExitCode=!errorlevel!"
if !parseExitCode! neq 0 exit /b !parseExitCode!

echo [INFO] Tests finished with no failures. Check the summary in win_test_summary.log.
exit /b 0

:exit_build_error
echo [ERROR] Check tests summary in 'win_test_summary.log' and tests logs in 'win_full_test.log'. Rerun failed test with: windows_setupvars.bat and %cd%\bazel-bin\src\ovms_test.exe --gtest_filter='*.*'
echo [ERROR] windows_test.bat failed before test parsing stage.
exit /b 1
endlocal