From fa4c003f790442394878bb48e39d29b95649c44a Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Sun, 21 Jun 2026 16:20:37 -0700 Subject: [PATCH] run_tests.bat -> download test data if stale --- run_tests.bat | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/run_tests.bat b/run_tests.bat index 9049980a..ca487581 100644 --- a/run_tests.bat +++ b/run_tests.bat @@ -8,6 +8,42 @@ set RAW_ARGS=%* set TORTURE_ARGS= set RUN_TORTURE=1 +:: Make test data directories +if not exist local mkdir local +pushd local +if not exist test_inputs mkdir test_inputs +popd + +:: Check if we need new test data version +pushd local +set need_test_data=0 +curl -s -o test_data_version_latest.txt https://data.raddbg.com/public/raddbg_test_data_version.txt +if exist "test_data_version_current.txt" ( + fc /b "test_data_version_latest.txt" "test_data_version_current.txt" > nul +) else ( + echo Test data not present. + set need_test_data=1 +) +if errorlevel 1 ( + echo Test data out-of-date. + set need_test_data=1 +) +popd + +:: Download test data if stale +if "%need_test_data%"=="1" ( + echo Downloading test data... + pushd local + pushd test_inputs + curl -s -o test_inputs.zip https://data.raddbg.com/public/raddbg_test_inputs.zip + tar -xf test_inputs.zip + del test_inputs.zip + popd + copy /y test_data_version_latest.txt test_data_version_current.txt + popd +) +popd + :parse_args if "%~1" == "" goto parse_done if "%~1" == "--" goto parse_torture_args