[Piglit] [Patch v2 07/13] framework: rename GleanTest.globalParams to GleanTest.GLOBAL_PARAMS

Dylan Baker baker.dylan.c at gmail.com
Tue May 13 11:38:40 PDT 2014


This is in keeping with PEP8

This commit generated via:
find . -name '*py' | xargs sed -i -e 's!globalParams!GLOBAL_PARAMS!g'

With manual cleanups in framework/tests/exectest_tests.py

Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
 framework/exectest.py            |  4 ++--
 framework/tests/exectest_test.py | 16 ++++++++--------
 tests/quick.py                   |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/framework/exectest.py b/framework/exectest.py
index a98dc9f..85ae04c 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -294,7 +294,7 @@ class PiglitTest(Test):
 
 
 class GleanTest(Test):
-    globalParams = []
+    GLOBAL_PARAMS = []
 
     def __init__(self, name, *args, **kwargs):
         super(GleanTest, self).__init__([_GLEAN_EXECUTABLE, "-o", "-v", "-v",
@@ -303,7 +303,7 @@ class GleanTest(Test):
 
     @Test.command.getter
     def command(self):
-        return super(GleanTest, self).command + self.globalParams
+        return super(GleanTest, self).command + self.GLOBAL_PARAMS
 
     def interpret_result(self):
         if 'FAIL' in self.result['out'] or self.result['returncode'] != 0:
diff --git a/framework/tests/exectest_test.py b/framework/tests/exectest_test.py
index 5875b00..7c725e5 100644
--- a/framework/tests/exectest_test.py
+++ b/framework/tests/exectest_test.py
@@ -42,21 +42,21 @@ def test_initialize_gleantest():
     assert test
 
 
-def test_globalParams_assignment():
-    """ Test to ensure that GleanTest.globalParams are correctly assigned
+def test_global_params_assignment():
+    """ Test to ensure that GleanTest.GLOBAL_PARAMS are correctly assigned
 
-    Specifically this tests for a bug where globalParams only affected
-    instances of GleanTest created after globalParams were set, so changing the
-    globalParams value had unexpected results.
+    Specifically this tests for a bug where GLOBAL_PARAMS only affected
+    instances of GleanTest created after GLOBAL_PARAMS were set, so changing the
+    GLOBAL_PARAMS value had unexpected results.
 
     If this test passes the GleanTest.command attributes will be the same in
-    the instance created before the globalParams assignment and the one created
-    after. A failure means the that globalParams are not being added to tests
+    the instance created before the GLOBAL_PARAMS assignment and the one created
+    after. A failure means the that GLOBAL_PARAMS are not being added to tests
     initialized before it is set.
 
     """
     test1 = GleanTest('basic')
-    GleanTest.globalParams = ['--quick']
+    GleanTest.GLOBAL_PARAMS = ['--quick']
     test2 = GleanTest('basic')
     assert test1.command == test2.command
 
diff --git a/tests/quick.py b/tests/quick.py
index 53b4eb3..99c66e1 100644
--- a/tests/quick.py
+++ b/tests/quick.py
@@ -5,7 +5,7 @@ from tests.all import profile
 
 __all__ = ['profile']
 
-GleanTest.globalParams += ["--quick"]
+GleanTest.GLOBAL_PARAMS += ["--quick"]
 
 # These take too long
 del profile.tests['shaders']['glsl-fs-inline-explosion']
-- 
2.0.0.rc2



More information about the Piglit mailing list