88 lines
2.6 KiB
Batchfile
88 lines
2.6 KiB
Batchfile
|
|
@echo off
|
||
|
|
REM ============================================================
|
||
|
|
REM HCIE-Rust v3.05 — Categorized Test Runner (Windows .bat)
|
||
|
|
REM Usage: run_tests_categorized.bat [--no-io] [--no-4k] [--ignored]
|
||
|
|
REM ============================================================
|
||
|
|
setlocal enabledelayedexpansion
|
||
|
|
|
||
|
|
set ROOT_DIR=%~dp0
|
||
|
|
cd /d "%ROOT_DIR%" || exit /b 1
|
||
|
|
|
||
|
|
echo ============================================================
|
||
|
|
echo HCIE-Rust v3.05 — Categorized Test Runner
|
||
|
|
echo Root: %ROOT_DIR%
|
||
|
|
echo ============================================================
|
||
|
|
|
||
|
|
set PASS=0
|
||
|
|
set FAIL=0
|
||
|
|
set SKIP=0
|
||
|
|
set SKIP_IO=0
|
||
|
|
set SKIP_4K=0
|
||
|
|
set INCLUDE_IGNORED=0
|
||
|
|
|
||
|
|
:parse_args
|
||
|
|
if "%~1"=="" goto :done_parse
|
||
|
|
if /I "%~1"=="--no-io" set SKIP_IO=1
|
||
|
|
if /I "%~1"=="--no-4k" set SKIP_4K=1
|
||
|
|
if /I "%~1"=="--ignored" set INCLUDE_IGNORED=1
|
||
|
|
shift
|
||
|
|
goto :parse_args
|
||
|
|
:done_parse
|
||
|
|
|
||
|
|
call :RUN_CATEGORY "Layer 1: DATA" hcie-protocol hcie-color
|
||
|
|
call :RUN_CATEGORY "Layer 2: Blend/Brush" hcie-blend hcie-brush-engine
|
||
|
|
call :RUN_CATEGORY "Layer 2: Draw/Composite/Filter" hcie-draw hcie-composite hcie-filter
|
||
|
|
call :RUN_CATEGORY "Layer 2: Selection/Vector/History" hcie-selection hcie-vector hcie-history
|
||
|
|
|
||
|
|
if %SKIP_IO%==1 (
|
||
|
|
echo [SKIP] hcie-io
|
||
|
|
set /a SKIP+=1
|
||
|
|
) else (
|
||
|
|
call :RUN_CRATE hcie-io
|
||
|
|
)
|
||
|
|
call :RUN_CATEGORY "Layer 2: PSD/Vision/Build" hcie-psd hcie-vision hcie-build-info
|
||
|
|
|
||
|
|
if %SKIP_4K%==1 (
|
||
|
|
echo [SKIP 4K benchmark in hcie-engine-api]
|
||
|
|
cargo test -p hcie-engine-api --skip benchmark_4k_stroke_on_multilayer_document
|
||
|
|
if !ERRORLEVEL!==0 ( set /a PASS+=1 ) else ( set /a FAIL+=1 )
|
||
|
|
) else (
|
||
|
|
call :RUN_CRATE hcie-engine-api
|
||
|
|
)
|
||
|
|
|
||
|
|
call :RUN_CATEGORY "Layer 6: GUI egui" hcie-gui-egui
|
||
|
|
call :RUN_CATEGORY "Layer 6: GUI iced" hcie-iced-gui
|
||
|
|
call :RUN_CATEGORY "Brush Catalogs" hcie-dry-media-brushes hcie-paint-brushes hcie-digital-brushes hcie-watercolor-brushes hcie-ink-brushes
|
||
|
|
|
||
|
|
if %INCLUDE_IGNORED%==1 (
|
||
|
|
echo.
|
||
|
|
echo ===== Running IGNORED tests =====
|
||
|
|
cargo test -p hcie-engine-api -- --ignored
|
||
|
|
cargo test -p hcie-brush-engine -- --ignored
|
||
|
|
cargo test -p hcie-iced-gui -- --ignored
|
||
|
|
cargo test -p hcie-fx -- --ignored
|
||
|
|
)
|
||
|
|
|
||
|
|
echo ============================================================
|
||
|
|
echo SUMMARY: %PASS% passed, %FAIL% failed, %SKIP% skipped
|
||
|
|
echo ============================================================
|
||
|
|
exit /b %FAIL%
|
||
|
|
|
||
|
|
:RUN_CATEGORY
|
||
|
|
set CATEGORY=%~1
|
||
|
|
shift
|
||
|
|
echo.
|
||
|
|
echo ===== Category: %CATEGORY% =====
|
||
|
|
:RUN_CATEGORY_LOOP
|
||
|
|
if "%~1"=="" goto :EOF
|
||
|
|
call :RUN_CRATE %~1
|
||
|
|
shift
|
||
|
|
goto RUN_CATEGORY_LOOP
|
||
|
|
|
||
|
|
:RUN_CRATE
|
||
|
|
set CRATE=%~1
|
||
|
|
echo --- Running: %CRATE% ---
|
||
|
|
cargo test -p %CRATE%
|
||
|
|
if %ERRORLEVEL%==0 ( set /a PASS+=1 ) else ( set /a FAIL+=1 )
|
||
|
|
goto :EOF
|