[Piglit] [PATCH] all.py: use os.path everywhere for consistency

Dylan Baker baker.dylan.c at gmail.com
Tue Jun 3 14:48:59 PDT 2014


On Tuesday, June 03, 2014 08:01:53 AM Brian Paul wrote:
> ---
>  tests/all.py |   11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/all.py b/tests/all.py
> index e2d1c77..b8a246b 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -5,7 +5,6 @@ __all__ = ['profile']
> 
>  import itertools
>  import os
> -import os.path as path
>  import platform
>  import subprocess
>  import sys
> @@ -17,7 +16,7 @@ from framework.glsl_parser_test import GLSLParserTest,
> add_glsl_parser_test, imp 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__)
> +testsDir = os.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]) @@ -26,8
> +25,8 @@ if sys.platform == "cygwin":
>  # Find the generated_tests directory, by looking either in
>  # $PIGLIT_BUILD_DIR (if that environment variable exists) or in the
>  # parent directory of the directory containing this file.
> -generatedTestDir = path.normpath(path.join(
> -    os.environ.get('PIGLIT_BUILD_DIR', path.join(testsDir, '..')),
> +generatedTestDir = os.path.normpath(os.path.join(
> +    os.environ.get('PIGLIT_BUILD_DIR', os.path.join(testsDir, '..')),
>      'generated_tests'))
> 
>  # Quick wrapper for PiglitTest for our usual concurrent args.
> @@ -3189,11 +3188,11 @@ glslparsertest = {}
>  for filename in os.listdir(testsDir + '/glslparsertest/shaders'):
>      ext = filename.rsplit('.')[-1]
>      if ext in ['vert', 'geo', 'frag']:
> -        add_glsl_parser_test(glslparsertest, path.join(testsDir,
> 'glslparsertest/shaders', filename), filename) +       
> add_glsl_parser_test(glslparsertest, os.path.join(testsDir,
> 'glslparsertest/shaders', filename), filename) for filename in
> os.listdir(testsDir + '/glslparsertest/glsl2'):
>      ext = filename.rsplit('.')[-1]
>      if ext in ['vert', 'geo', 'frag']:
> -        add_glsl_parser_test(glslparsertest, path.join(testsDir,
> 'glslparsertest/glsl2', filename), 'glsl2/' + filename) +       
> add_glsl_parser_test(glslparsertest, os.path.join(testsDir,
> 'glslparsertest/glsl2', filename), 'glsl2/' + filename) # end group
> glslparsertest ---------------------------------------------------
> 
>  hiz = {}

Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>
-------------- 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/20140603/ae76ca87/attachment-0001.sig>


More information about the Piglit mailing list