On Sunday, June 01, 2014 03:03:21 PM 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.
> ---
> 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)The commands module is deprecated in python 2.6 and removed in python3, please use subprocess instead. https://docs.python.org/2/library/commands.html I haven't testd, but this should be equivalent. subprocess.check_output(['cygpath', '-d', testsDir]) Just my opinion, but I would rather just have subrprocess at the top of the file than in the if block, but I'm not going to make a fuss either way > > # 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
