Files
Your Name 513efcdcff
mandatory-regression-gate / deterministic-tests (push) Has been cancelled
mandatory-regression-gate / protected-performance-path (push) Has been cancelled
Refactor dependencies and improve test runner diagnostics
- Updated `Cargo.toml` files across multiple crates to replace local `egui` and `eframe` dependencies with workspace references, ensuring consistent platform support.
- Enhanced `run_all_tests.bat` and `run_all_tests.sh` scripts to capture and report names of failed and skipped crates, improving test diagnostics.
- Fixed duplicate keys in `hcie-text/Cargo.toml` and ensured proper feature activation for Linux builds in affected crates.
- Added a new repair plan document outlining steps to address failing crates and improve overall test execution reliability.
2026-07-23 16:34:05 +03:00

149 lines
3.5 KiB
Batchfile

@echo off
REM ============================================================
REM HCIE-Rust v3.05 — Bulk All-Tests Execution Script (Windows)
REM Usage: run_all_tests.bat [--no-io] [--no-4k] [--ignored]
REM ============================================================
setlocal DisableDelayedExpansion
set "ROOT_DIR=%~dp0"
cd /d "%ROOT_DIR%" || exit /b 1
setlocal EnableDelayedExpansion
set PASS=0
set FAIL=0
set SKIP=0
set FAILED_CRATES=
set SKIPPED_CRATES=
set START_TIME=%TIME%
set SKIP_IO=0
set SKIP_4K=0
set INCLUDE_IGNORED=0
set CARGO_ARGS=
set TEST_ARGS=
set PARSING_TEST_ARGS=0
:parse_args
if "%~1"=="" goto :done_parse
if "!PARSING_TEST_ARGS!"=="1" goto :collect_test_arg
if /I "%~1"=="--no-io" goto :enable_no_io
if /I "%~1"=="--no-4k" goto :enable_no_4k
if /I "%~1"=="--ignored" goto :enable_ignored
if "%~1"=="--" goto :begin_test_args
set "CARGO_ARGS=!CARGO_ARGS! "%~1""
shift
goto :parse_args
:enable_no_io
set SKIP_IO=1
shift
goto :parse_args
:enable_no_4k
set SKIP_4K=1
shift
goto :parse_args
:enable_ignored
set INCLUDE_IGNORED=1
shift
goto :parse_args
:begin_test_args
set PARSING_TEST_ARGS=1
shift
goto :parse_args
:collect_test_arg
set "TEST_ARGS=!TEST_ARGS! "%~1""
shift
goto :parse_args
:done_parse
call :RUN_CRATE "hcie-protocol"
call :RUN_CRATE "hcie-color"
call :RUN_CRATE "hcie-blend"
call :RUN_CRATE "hcie-brush-engine"
call :RUN_CRATE "hcie-draw"
call :RUN_CRATE "hcie-composite"
call :RUN_CRATE "hcie-filter"
call :RUN_CRATE "hcie-selection"
call :RUN_CRATE "hcie-vector"
call :RUN_CRATE "hcie-history"
if %SKIP_IO%==1 (
echo [SKIP] hcie-io
set /a SKIP+=1
set SKIPPED_CRATES=!SKIPPED_CRATES! hcie-io
) else (
call :RUN_CRATE "hcie-io"
)
call :RUN_CRATE "psd"
call :RUN_CRATE "hcie-vision"
call :RUN_CRATE "hcie-build-info"
if %SKIP_4K%==1 (
call :RUN_CRATE "hcie-engine-api" --skip benchmark_4k_stroke_on_multilayer_document
) else (
call :RUN_CRATE "hcie-engine-api"
)
call :RUN_CRATE "hcie-gui-egui"
call :RUN_CRATE "hcie-iced-gui"
call :RUN_CRATE "hcie-dry-media-brushes"
call :RUN_CRATE "hcie-paint-brushes"
call :RUN_CRATE "hcie-digital-brushes"
call :RUN_CRATE "hcie-watercolor-brushes"
call :RUN_CRATE "hcie-ink-brushes"
if %INCLUDE_IGNORED%==1 (
echo.
echo ===== Running IGNORED tests =====
call :RUN_IGNORED hcie-engine-api
call :RUN_IGNORED hcie-brush-engine
call :RUN_IGNORED hcie-iced-gui
call :RUN_IGNORED hcie-fx
)
echo ============================================================
echo BULK TEST EXECUTION COMPLETE
echo Test runs passed: %PASS%
echo Test runs failed: %FAIL%
echo Crates skipped: %SKIP%
if not "%FAILED_CRATES%"=="" echo Failed crates:%FAILED_CRATES%
if not "%SKIPPED_CRATES%"=="" echo Skipped crates:%SKIPPED_CRATES%
echo Start time: %START_TIME%
echo ============================================================
exit /b %FAIL%
:RUN_CRATE
set "CRATE=%~1"
set "CRATE_TEST_ARGS="
:RUN_CRATE_ARG_LOOP
shift
if "%~1"=="" goto :RUN_CRATE_EXECUTE
set "CRATE_TEST_ARGS=!CRATE_TEST_ARGS! "%~1""
goto :RUN_CRATE_ARG_LOOP
:RUN_CRATE_EXECUTE
set "TEST_SEPARATOR="
if not "!CRATE_TEST_ARGS!!TEST_ARGS!"=="" set "TEST_SEPARATOR=--"
echo.
echo ===== Running: !CRATE! =====
cargo test -p "!CRATE!" !CARGO_ARGS! !TEST_SEPARATOR! !CRATE_TEST_ARGS! !TEST_ARGS!
if errorlevel 1 (
set /a FAIL+=1
set FAILED_CRATES=!FAILED_CRATES! !CRATE!
) else (
set /a PASS+=1
)
goto :EOF
:RUN_IGNORED
set "IGNORED_CRATE=%~1"
cargo test -p "!IGNORED_CRATE!" !CARGO_ARGS! -- --ignored !TEST_ARGS!
if errorlevel 1 (
set /a FAIL+=1
set FAILED_CRATES=!FAILED_CRATES! !IGNORED_CRATE![ignored]
) else (
set /a PASS+=1
)
goto :EOF