[Piglit] [PATCH v2 4/9] tests/oglconform.py: override command.getter

baker.dylan.c at gmail.com baker.dylan.c at gmail.com
Mon Oct 26 11:58:56 PDT 2015


From: Dylan Baker <baker.dylan.c at gmail.com>

This moves some constant arguments out of the permanently stored values
in each test instance into a getter, which reduces the number of
duplicate elements that need to be stored per instance. This reduces
memory usage a little.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/oglconform.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/oglconform.py b/tests/oglconform.py
index a34d433..c74f3fe 100644
--- a/tests/oglconform.py
+++ b/tests/oglconform.py
@@ -51,8 +51,12 @@ class OGLCTest(Test):
                          r'scheduled due to lack of compatible fbconfig')
 
     def __init__(self, category, subtest):
-        super(OGLCTest, self).__init__([bin_oglconform, '-minFmt', '-v', '4',
-                                        '-test', category, subtest])
+        super(OGLCTest, self).__init__([category, subtest])
+
+    @Test.command.getter
+    def command(self):
+        return [bin_oglconform, '-minFmt', '-v', '4', '-test'] + \
+            super(OGLCTest, self).command
 
     def interpret_result(self):
         if self.skip_re.search(self.result.out) is not None:
-- 
2.6.2



More information about the Piglit mailing list