From 35ee6a368ef22c83ff76e6c0e5bad4349061b22e Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 26 Jan 2015 10:31:55 -0800 Subject: igt.py: Replace igtTestRoot with PEP8 compliant IGT_TEST_ROOT v2: - Add this patch to the series Signed-off-by: Dylan Baker Reviewed-by: Thomas Wood --- tests/igt.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/igt.py b/tests/igt.py index aa9465b85..bba7b5acb 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) -- cgit v1.2.3