[Piglit] [PATCH 1/3] igt: retab
Daniel Vetter
daniel.vetter at ffwll.ch
Tue Nov 12 02:36:31 PST 2013
I so failed at my python setup when doing this way back (less than a
year ago).
---
tests/igt.tests | 66 ++++++++++++++++++++++++++++-----------------------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/tests/igt.tests b/tests/igt.tests
index 1d0da50..e0eb826 100644
--- a/tests/igt.tests
+++ b/tests/igt.tests
@@ -50,16 +50,16 @@ profile = TestProfile()
class IGTTest(ExecTest):
def __init__(self, binary, arguments=[]):
- ExecTest.__init__(self, [path.join(igtTestRoot, binary)] + arguments)
+ ExecTest.__init__(self, [path.join(igtTestRoot, binary)] + arguments)
def interpretResult(self, out, returncode, results, dmesg):
- if returncode == 0:
- results['result'] = 'dmesg-warn' if dmesg != '' else 'pass'
- elif returncode == 77:
- results['result'] = 'skip'
- else:
- results['result'] = 'dmesg-fail' if dmesg != '' else 'fail'
- return out
+ if returncode == 0:
+ results['result'] = 'dmesg-warn' if dmesg != '' else 'pass'
+ elif returncode == 77:
+ results['result'] = 'skip'
+ else:
+ results['result'] = 'dmesg-fail' if dmesg != '' else 'fail'
+ return out
def run(self, env):
env.dmesg = True
return ExecTest.run(self, env)
@@ -67,30 +67,30 @@ class IGTTest(ExecTest):
def listTests(listname):
oldDir = os.getcwd()
try:
- os.chdir(igtTestRoot)
- proc = subprocess.Popen(
- ['make', listname ],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- env=os.environ.copy(),
- universal_newlines=True
- )
- out, err = proc.communicate()
- returncode = proc.returncode
+ os.chdir(igtTestRoot)
+ proc = subprocess.Popen(
+ ['make', listname ],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ env=os.environ.copy(),
+ universal_newlines=True
+ )
+ out, err = proc.communicate()
+ returncode = proc.returncode
finally:
- os.chdir(oldDir)
+ os.chdir(oldDir)
lines = out.split('\n')
found_header = False
progs = ""
for line in lines:
- if found_header:
- progs = line.split(" ")
- break
+ if found_header:
+ progs = line.split(" ")
+ break
- if "TESTLIST" in line:
- found_header = True;
+ if "TESTLIST" in line:
+ found_header = True;
return progs
@@ -101,21 +101,21 @@ for test in singleTests:
def addSubTestCases(test):
proc = subprocess.Popen(
- [path.join(igtTestRoot, test), '--list-subtests' ],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- env=os.environ.copy(),
- universal_newlines=True
- )
+ [path.join(igtTestRoot, test), '--list-subtests' ],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ env=os.environ.copy(),
+ universal_newlines=True
+ )
out, err = proc.communicate()
returncode = proc.returncode
subtests = out.split("\n")
for subtest in subtests:
- if subtest == "":
- continue
- profile.test_list[path.join('igt', test, subtest)] = \
+ if subtest == "":
+ continue
+ profile.test_list[path.join('igt', test, subtest)] = \
IGTTest(test, ['--run-subtest', subtest])
multiTests = listTests("list-multi-tests")
--
1.8.1.4
More information about the Piglit
mailing list