add Lua sandbox with timer system (milestones 1-5 complete)
This commit is contained in:
59
sandbox-test/run_tests.bat
Normal file
59
sandbox-test/run_tests.bat
Normal file
@@ -0,0 +1,59 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
echo ========================================
|
||||
echo MOSIS SANDBOX TEST RUNNER
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM Check if build exists
|
||||
if not exist "build\Debug\sandbox-test.exe" (
|
||||
echo Build not found. Building...
|
||||
echo.
|
||||
|
||||
REM Check VCPKG_ROOT
|
||||
if "%VCPKG_ROOT%"=="" (
|
||||
echo ERROR: VCPKG_ROOT environment variable not set
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Configure
|
||||
echo Configuring CMake...
|
||||
cmake -B build -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake
|
||||
if errorlevel 1 (
|
||||
echo ERROR: CMake configure failed
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Build
|
||||
echo Building...
|
||||
cmake --build build --config Debug
|
||||
if errorlevel 1 (
|
||||
echo ERROR: Build failed
|
||||
exit /b 1
|
||||
)
|
||||
echo.
|
||||
)
|
||||
|
||||
REM Run tests
|
||||
echo Running tests...
|
||||
echo.
|
||||
|
||||
cd build\Debug
|
||||
sandbox-test.exe %*
|
||||
set TEST_RESULT=%errorlevel%
|
||||
|
||||
cd ..\..
|
||||
|
||||
echo.
|
||||
if %TEST_RESULT% equ 0 (
|
||||
echo ========================================
|
||||
echo ALL TESTS PASSED
|
||||
echo ========================================
|
||||
) else (
|
||||
echo ========================================
|
||||
echo SOME TESTS FAILED
|
||||
echo ========================================
|
||||
)
|
||||
|
||||
exit /b %TEST_RESULT%
|
||||
Reference in New Issue
Block a user