@echo off
REM Test runner batch script for kabellaengen project
REM Calls run_tests.py to execute all tests

call %~dp0setenv.bat

CALL manage_interpreter.bat activate_interpreter
if %ERRORLEVEL% NEQ 0 (
    echo.
    echo Failed to activate the Python interpreter!
    pause
    exit /B 1
)

python %PROJECT_LIB%\run_tests.py %*

if %ERRORLEVEL% NEQ 0 (
    echo.
    echo Tests failed!
    CALL manage_interpreter.bat deactivate_interpreter
    exit /B 1
) else (
    echo.
    echo All tests passed!
    CALL manage_interpreter.bat deactivate_interpreter
    exit /B 0
)