[9/11] tests/cts_gles: Add support for group-at-a-time mode

Submitted by Dylan Baker on Aug. 26, 2016, 6:31 p.m.

Details

Message ID 092efe50dd6807aca201467f3064ad9b618faa90.1472236000.git-series.dylan@pnwbakers.com
State New
Headers show
Series "unittests: Fix shared data for backends." ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Dylan Baker Aug. 26, 2016, 6:31 p.m.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
---
 tests/cts_gles.py | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/cts_gles.py b/tests/cts_gles.py
index a6a7ec8..7c2dc21 100644
--- a/tests/cts_gles.py
+++ b/tests/cts_gles.py
@@ -54,19 +54,33 @@  __all__ = ['profile']
 _CTS_BIN = deqp.get_option('PIGLIT_CTS_GLES_BIN', ('cts_gles', 'bin'),
                            required=True)
 
-_EXTRA_ARGS = deqp.get_option('PIGLIT_CTS_GLES_EXTRA_ARGS', ('cts_gles', 'extra_args'),
+_EXTRA_ARGS = deqp.get_option('PIGLIT_CTS_GLES_EXTRA_ARGS',
+                              ('cts_gles', 'extra_args'),
                               default='').split()
 
 
-class DEQPCTSTest(deqp.DEQPSingleTest):
+class _CTSMixin(object):
+    """Mixin that provides the shared bits for the GL CTS class."""
+
     deqp_bin = _CTS_BIN
 
     @property
     def extra_args(self):
-        return super(DEQPCTSTest, self).extra_args + \
+        return super(_CTSMixin, self).extra_args + \
             [x for x in _EXTRA_ARGS if not x.startswith('--deqp-case')]
 
 
+class DEQPCTSSingleTest(_CTSMixin, deqp.DEQPSingleTest):
+    """Class For running the GL CTS tests in a one test per process mode."""
+    pass
+
+
+class DEQPCTSGroupTest(_CTSMixin, deqp.DEQPGroupTest):
+    """Class For running the GL CTS tests in a multiple tests per process mode.
+    """
+    pass
+
+
 # Add all of the suites by default, users can use filters to remove them.
 profile = deqp.make_profile(  # pylint: disable=invalid-name
     itertools.chain(
@@ -80,4 +94,4 @@  profile = deqp.make_profile(  # pylint: disable=invalid-name
             deqp.gen_caselist_txt(_CTS_BIN, 'ESEXT-CTS-cases.txt',
                                   _EXTRA_ARGS)),
     ),
-    DEQPCTSTest)
+    single=DEQPCTSSingleTest, group=DEQPCTSGroupTest)