Skip to content

Commit

Permalink
Fix .bat launchers (#811)
Browse files Browse the repository at this point in the history
Fixes #801
  • Loading branch information
paulthomson authored Dec 10, 2019
1 parent fc0c754 commit 61bdedc
Show file tree
Hide file tree
Showing 20 changed files with 221 additions and 141 deletions.
18 changes: 11 additions & 7 deletions build/travis/python-launch.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 %*
) ELSE (
python %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 %*
) ELSE (
python %*
)
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
18 changes: 11 additions & 7 deletions python/src/main/python/drivers/backtrace-summary.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
18 changes: 11 additions & 7 deletions python/src/main/python/drivers/gapidfuzz.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
18 changes: 11 additions & 7 deletions python/src/main/python/drivers/glsl-generate.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
18 changes: 11 additions & 7 deletions python/src/main/python/drivers/glsl-reduce.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
18 changes: 11 additions & 7 deletions python/src/main/python/drivers/glsl-server.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
18 changes: 11 additions & 7 deletions python/src/main/python/drivers/glsl-to-spv-worker.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
20 changes: 12 additions & 8 deletions python/src/main/python/drivers/graphicsfuzz-piglit-converter.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
)
18 changes: 11 additions & 7 deletions python/src/main/python/drivers/graphicsfuzz-tool.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
18 changes: 11 additions & 7 deletions python/src/main/python/drivers/inspect-compute-results.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
18 changes: 11 additions & 7 deletions python/src/main/python/drivers/knownvalue-shader-generator.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
18 changes: 11 additions & 7 deletions python/src/main/python/drivers/piglit-worker.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
@REM limitations under the License.
@REM

where /q py
IF ERRORLEVEL 0 (
py -3 "%~dpn0.py" %*
IF DEFINED PYTHON_GF (
"%PYTHON_GF%" "%~dpn0.py" %*
) ELSE (
where /q python3
IF ERRORLEVEL 0 (
python3 "%~dpn0.py" %*
where /q py
IF %ERRORLEVEL% EQU 0 (
py -3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
where /q python3
IF %ERRORLEVEL% EQU 0 (
python3 "%~dpn0.py" %*
) ELSE (
python "%~dpn0.py" %*
)
)
)
Loading

0 comments on commit 61bdedc

Please sign in to comment.