bat Dateien mit Errorlevel versehen. manage_interpreter.bat vereinfacht. Nur noch eine Umgebungsvar für den Python Interpreter im Netzwerk.
This commit is contained in:
+10
-6
@@ -4,24 +4,28 @@ REM Calls run_tests.py to execute all tests
|
||||
|
||||
call %~dp0setenv.bat
|
||||
|
||||
CALL manage_interpreter.bat activate_interpreter
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
CALL manage_interpreter.bat activate
|
||||
if errorlevel 1 (
|
||||
echo.
|
||||
echo Failed to activate the Python interpreter!
|
||||
pause
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
python %PROJECT_LIB%\run_tests.py %*
|
||||
pushd "%PROJECT%"
|
||||
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
"%VIRTUAL_ENV%\Scripts\python.exe" -m lib.run_tests %*
|
||||
set PYTHON_EXIT=%ERRORLEVEL%
|
||||
|
||||
popd
|
||||
CALL manage_interpreter.bat deactivate
|
||||
|
||||
if %PYTHON_EXIT% 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
|
||||
)
|
||||
Reference in New Issue
Block a user