11@ echo off
2+ REM ======================================================
3+ REM Virtual environment test script
4+ REM ======================================================
5+ REM Licensed under the terms of the MIT License
6+ REM Copyright (c) 2020 Pierre Raybaut
7+ REM (see LICENSE file for more details)
8+ REM ======================================================
29setlocal
10+ call %~dp0 utils GetScriptPath SCRIPTPATH
311set UNATTENDED = 1
4- call %~dp0 build_dist
12+ call %SCRIPTPATH% \build_dist
513set PYTHONPATH =
6- call %~dp0 func UseWinPython
14+ call %FUNC% UseWinPython
715call :TestEnv PyQt5
816call :TestEnv PySide2
917set UNATTENDED =
10- call %~dp0 func EndOfScript
18+ call %FUNC% EndOfScript
1119exit /B %ERRORLEVEL%
1220
1321:TestEnv
14- call %~dp0 func ShowTitle " Testing in %~1 -based Python virtual environment"
15- set VENVPATH = cd %~dp0 ..\build\testenv
22+ call %FUNC% GetLibName LIBNAME
23+ call %FUNC% ShowTitle " Testing in %~1 -based Python virtual environment"
24+ set VENVPATH = %SCRIPTPATH% \..\build\testenv
1625python -m venv %VENVPATH%
1726call %VENVPATH% \Scripts\activate
27+ python -m pip install --upgrade pip
1828pip install %~1
19- for %%f IN (" %~dp0 ..\dist\PythonQwt -*.whl" ) DO ( pip install %%f )
20- call %VENVPATH% \Scripts\PythonQwt -tests-py3 --mode unattended
29+ for %%f IN (" %SCRIPTPATH% \ ..\dist\%LIBNAME% -*.whl" ) DO ( pip install %%f )
30+ call %VENVPATH% \Scripts\%LIBNAME% -tests-py3 --mode unattended
2131call %VENVPATH% \Scripts\deactivate
2232exit /B 0
0 commit comments