[Piglit] [PATCH 2/3] all.py: check if running in cygwin, use Windows-style path for testsDir

Dylan Baker baker.dylan.c at gmail.com
Mon Jun 2 03:57:56 PDT 2014


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.

sorry, one more thing,
s/os/so

> +    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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140602/608e7b59/attachment.sig>


More information about the Piglit mailing list