File: run_unattended_tests.bat

package info (click to toggle)
python-qwt 0.12.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,376 kB
  • sloc: python: 11,953; makefile: 19; sh: 10
file content (39 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@echo off
REM ======================================================
REM Unattended test script
REM ======================================================
REM Licensed under the terms of the MIT License
REM Copyright (c) 2020 Pierre Raybaut
REM (see LICENSE file for more details)
REM ======================================================
setlocal
call %~dp0utils GetScriptPath SCRIPTPATH
call %FUNC% SetPythonPath
cd %SCRIPTPATH%\..\

if not defined WINPYDIRBASE ( goto :no )
choice /t 5 /c yn /cs /d n /m "Do you want to run tests only from %WINPYDIRBASE% (y/n)?"
if errorlevel 2 goto :no
:yes
call :test %WINPYDIRBASE%
pause
exit /B %ERRORLEVEL%
:no
for /d %%d in (C:,C:\Apps,%localappdata%\Programs,%programfiles%,%ProgramFiles(x86^^^)%) do (
    for /f %%f in ('dir /b %%d\w*') do (
        call :test %%d\%%f
        )
    )
pause
exit /B %ERRORLEVEL%

:test
set ENV=%~1\scripts\env.bat
if exist %ENV% (
    @echo:
    @echo ************************** Testing with %~1 **************************
    @echo:
    call %ENV%
    pytest
    )
exit /B 0