37 lines
929 B
Batchfile
37 lines
929 B
Batchfile
@echo off
|
|
CALL setenv.bat
|
|
|
|
echo ========================================
|
|
echo running all unittests in lib\Elemente
|
|
echo ========================================
|
|
echo.
|
|
CALL manage_interpreter.bat activate
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo.
|
|
echo Failed to activate the Python interpreter!
|
|
pause
|
|
exit /B 1
|
|
)
|
|
echo Gefundene Testdateien:
|
|
for /f "delims=" %%f in ('dir /b "%PROJECT_LIB%\Elemente\*_tests.py" 2^>nul') do echo %%f
|
|
echo.
|
|
cd /d "%PROJECT%"
|
|
if errorlevel 1 (
|
|
echo ERROR: Failed to change to project directory: %PROJECT%
|
|
CALL manage_interpreter.bat deactivate
|
|
exit /b 1
|
|
)
|
|
"%VIRTUAL_ENV%\Scripts\python.exe" -m unittest discover -t "%PROJECT%" -s lib\Elemente -p "*_tests.py" -v
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo.
|
|
echo Tests failed!
|
|
CALL manage_interpreter.bat deactivate
|
|
exit /B 1
|
|
) else (
|
|
echo.
|
|
echo All tests passed!
|
|
CALL manage_interpreter.bat deactivate
|
|
exit /B 0
|
|
)
|
|
|