[Piglit] [Patch v2 06/18] gleantest.py: rename GleanTest.globalParams to GLOBAL_PARAMS
Dylan Baker
baker.dylan.c at gmail.com
Mon Jul 28 15:35:15 PDT 2014
This replaces the camel case name with an all caps constant name.
this patch generated by:
find . -name '*py' | xargs sed -i -e 's!globalParams!GLOBAL_PARAMS!g'
Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
framework/gleantest.py | 4 ++--
framework/tests/gleantest_tests.py | 16 ++++++++--------
tests/quick.py | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/framework/gleantest.py b/framework/gleantest.py
index 9932ab0..8f547e5 100644
--- a/framework/gleantest.py
+++ b/framework/gleantest.py
@@ -30,7 +30,7 @@ glean_executable = os.path.join(TEST_BIN_DIR, "glean")
# GleanTest: Execute a sub-test of Glean
class GleanTest(Test):
- globalParams = []
+ GLOBAL_PARAMS = []
def __init__(self, name, **kwargs):
super(GleanTest, self).__init__(
@@ -39,7 +39,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 self.result['returncode'] != 0 or 'FAIL' in self.result['out']:
diff --git a/framework/tests/gleantest_tests.py b/framework/tests/gleantest_tests.py
index a6a6298..dd309d9 100644
--- a/framework/tests/gleantest_tests.py
+++ b/framework/tests/gleantest_tests.py
@@ -32,21 +32,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 939aded..9dc0f98 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.2
More information about the Piglit
mailing list