[Piglit] [PATCH 2/3] all.py: check if running in cygwin, use Windows-style path for testsDir
Brian Paul
brianp at vmware.com
Sun Jun 1 14:03:21 PDT 2014
Otherwise, the file path we're passing to programs such as shader_runner
is in Unix style, which Windows programs don't understand.
---
tests/all.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/all.py b/tests/all.py
index a42e79e..bf174b7 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -8,6 +8,7 @@ import os
import os.path as path
import platform
import shlex
+import sys
from framework.profile import TestProfile
from framework.exectest import PiglitTest
@@ -17,6 +18,10 @@ from framework.shader_test import add_shader_test_dir
# Path to tests dir, correct even when not running from the top directory.
testsDir = path.dirname(__file__)
+if sys.platform == "cygwin":
+ # convert the path to DOS style os it's parsable by shader_runner, etc.
+ import commands
+ testsDir = commands.getoutput('cygpath -d %s' % testsDir)
# Find the generated_tests directory, by looking either in
# $PIGLIT_BUILD_DIR (if that environment variable exists) or in the
--
1.7.10.4
More information about the Piglit
mailing list