[Piglit] [PATCH] igt.py: Fix PEP 8 issues.

Dylan Baker baker.dylan.c at gmail.com
Mon Mar 9 10:47:25 PDT 2015


This one will need to be rebased, it's not going to apply anymore.

On Sun, Mar 08, 2015 at 01:52:21PM -0700, Vinson Lee wrote:
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/igt.py | 25 ++++++++++++++-----------
>  1 file changed, 14 insertions(+), 11 deletions(-)
> 
> diff --git a/tests/igt.py b/tests/igt.py
> index bd4c70e..4a68497 100644
> --- a/tests/igt.py
> +++ b/tests/igt.py
> @@ -34,13 +34,14 @@ from framework.profile import TestProfile, Test
>  __all__ = ['profile']
>  
>  #############################################################################
> -##### IGTTest: Execute an intel-gpu-tools test
> -#####
> -##### To use this, create an igt symlink in piglit/bin which points to the root
> -##### of the intel-gpu-tools sources with the compiled tests. Piglit will
> -##### automatically add all tests into the 'igt' category.
> +# IGTTest: Execute an intel-gpu-tools test
> +#
> +# To use this, create an igt symlink in piglit/bin which points to the root
> +# of the intel-gpu-tools sources with the compiled tests. Piglit will
> +# automatically add all tests into the 'igt' category.
>  #############################################################################
>  
> +
>  def checkEnvironment():
>      debugfs_path = "/sys/kernel/debug/dri"
>      if os.getuid() != 0:
> @@ -69,8 +70,8 @@ else:
>      assert os.path.exists(igtTestRoot)
>  
>  # check for the test lists
> -if not (os.path.exists(os.path.join(igtTestRoot, 'single-tests.txt'))
> -        and os.path.exists(os.path.join(igtTestRoot, 'multi-tests.txt'))):
> +if not (os.path.exists(os.path.join(igtTestRoot, 'single-tests.txt')) and
> +        os.path.exists(os.path.join(igtTestRoot, 'multi-tests.txt'))):
>      print "intel-gpu-tools test lists not found."
>      sys.exit(0)
>  
> @@ -83,6 +84,7 @@ class IGTTestProfile(TestProfile):
>  
>  profile = IGTTestProfile()
>  
> +
>  class IGTTest(Test):
>      def __init__(self, binary, arguments=None):
>          if arguments is None:
> @@ -122,6 +124,7 @@ def listTests(listname):
>  tests = listTests("single-tests")
>  tests.extend(listTests("multi-tests"))
>  
> +
>  def addSubTestCases(test):
>      proc = subprocess.Popen(
>              [os.path.join(igtTestRoot, test), '--list-subtests'],
> @@ -134,12 +137,12 @@ def addSubTestCases(test):
>  
>      # a return code of 79 indicates there are no subtests
>      if proc.returncode == 79:
> -         profile.test_list[grouptools.join('igt', test)] = IGTTest(test)
> -         return
> +        profile.test_list[grouptools.join('igt', test)] = IGTTest(test)
> +        return
>  
>      if proc.returncode != 0:
> -         print "Error: Could not list subtests for " + test
> -         return
> +        print "Error: Could not list subtests for " + test
> +        return
>  
>      subtests = out.split("\n")
>  
> -- 
> 2.3.1
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150309/0919c273/attachment.sig>


More information about the Piglit mailing list