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

Vinson Lee vlee at freedesktop.org
Sun Mar 8 13:52:21 PDT 2015


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



More information about the Piglit mailing list