On Tuesday, June 03, 2014 07:57:55 AM Brian Paul wrote:
> Otherwise, the file path we're passing to programs such as shader_runner
> is in Unix style, which Windows programs don't understand.
>
> v2: use subprocess module instead of commands module, per Dylan
> ---
> tests/all.py | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tests/all.py b/tests/all.py
> index a42e79e..aae0f54 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -7,7 +7,8 @@ import itertools
> import os
> import os.path as path
> import platform
> -import shlex
> +import subprocess
> +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 so it's parsable by shader_runner, etc.
> + testsDir = subprocess.check_output(['cygpath', '-d', testsDir]) +
> testsDir = testsDir.replace('\n', '') # remove trailing newlineyou could simplify this by calling subprocess.check_output().rstrip() instead of replace(). without arguments rstrip() removes trailing whitespace With that change: Reviewed-by: Dylan Baker <[email protected]> > > # Find the generated_tests directory, by looking either in > # $PIGLIT_BUILD_DIR (if that environment variable exists) or in the
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
