[Piglit] [Patch v3 3/8] igt.py: Replace igtTestRoot with PEP8 compliant IGT_TEST_ROOT
Dylan Baker
baker.dylan.c at gmail.com
Wed Jan 28 11:35:03 PST 2015
v2: - Add this patch to the series
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
tests/igt.py | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tests/igt.py b/tests/igt.py
index aa9465b..bba7b5a 100644
--- a/tests/igt.py
+++ b/tests/igt.py
@@ -62,15 +62,15 @@ def checkEnvironment():
return True
if 'IGT_TEST_ROOT' in os.environ:
- igtTestRoot = os.environ['IGT_TEST_ROOT']
+ IGT_TEST_ROOT = os.environ['IGT_TEST_ROOT']
else:
- igtTestRoot = os.path.join(framework.core.PIGLIT_CONFIG.get('igt', 'path'),
- 'tests')
- assert os.path.exists(igtTestRoot)
+ IGT_TEST_ROOT = os.path.join(
+ framework.core.PIGLIT_CONFIG.get('igt', 'path'), 'tests')
+ assert os.path.exists(IGT_TEST_ROOT)
# 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(IGT_TEST_ROOT, 'single-tests.txt'))
+ and os.path.exists(os.path.join(IGT_TEST_ROOT, 'multi-tests.txt'))):
print "intel-gpu-tools test lists not found."
sys.exit(0)
@@ -88,7 +88,7 @@ class IGTTest(Test):
if arguments is None:
arguments = []
super(IGTTest, self).__init__(
- [os.path.join(igtTestRoot, binary)] + arguments)
+ [os.path.join(IGT_TEST_ROOT, binary)] + arguments)
self.timeout = 600
def interpret_result(self):
@@ -103,7 +103,7 @@ class IGTTest(Test):
def listTests(listname):
- with open(os.path.join(igtTestRoot, listname + '.txt'), 'r') as f:
+ with open(os.path.join(IGT_TEST_ROOT, listname + '.txt'), 'r') as f:
lines = (line.rstrip() for line in f.readlines())
found_header = False
@@ -122,7 +122,7 @@ tests.extend(listTests("multi-tests"))
def addSubTestCases(test):
proc = subprocess.Popen(
- [os.path.join(igtTestRoot, test), '--list-subtests'],
+ [os.path.join(IGT_TEST_ROOT, test), '--list-subtests'],
stdout=subprocess.PIPE,
env=os.environ.copy(),
universal_newlines=True)
--
2.2.2
More information about the Piglit
mailing list