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.
This commit is contained in:
+74
-19
@@ -3,25 +3,54 @@ 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 enabledelayedexpansion
|
||||
setlocal DisableDelayedExpansion
|
||||
|
||||
set ROOT_DIR=%~dp0
|
||||
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 /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
|
||||
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
|
||||
@@ -41,18 +70,17 @@ 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 "hcie-psd"
|
||||
call :RUN_CRATE "psd"
|
||||
call :RUN_CRATE "hcie-vision"
|
||||
call :RUN_CRATE "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 )
|
||||
call :RUN_CRATE "hcie-engine-api" --skip benchmark_4k_stroke_on_multilayer_document
|
||||
) else (
|
||||
call :RUN_CRATE "hcie-engine-api"
|
||||
)
|
||||
@@ -69,25 +97,52 @@ call :RUN_CRATE "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
|
||||
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 Crates passed: %PASS%
|
||||
echo Crates failed: %FAIL%
|
||||
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=%~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%
|
||||
if %ERRORLEVEL%==0 ( set /a PASS+=1 ) else ( set /a FAIL+=1 )
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user