[6/9] tests/cts_gl: Add support for running without process isolation

Submitted by Dylan Baker on Oct. 31, 2016, 10:25 p.m.

Details

Message ID dc4d5c4f0040e09946e936d76da96865a15b77cc.1477952711.git-series.dylan@pnwbakers.com
State New
Headers show
Series "Add support to deqp based profiles to remove process isolation" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

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

Patch hide | download patch | download mbox

diff --git a/tests/cts_gl.py b/tests/cts_gl.py
index 5b03e4a..b3c0782 100644
--- a/tests/cts_gl.py
+++ b/tests/cts_gl.py
@@ -1,4 +1,4 @@ 
-# Copyright (c) 2015 Intel Corporation
+# Copyright (c) 2015-2016 Intel Corporation
 
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -57,14 +57,28 @@  _EXTRA_ARGS = deqp.get_option('PIGLIT_CTS_GL_EXTRA_ARGS', ('cts_gl', '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.DEQPGroupTrieTest):
+    """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(
@@ -89,4 +103,4 @@  profile = deqp.make_profile(  # pylint: disable=invalid-name
         deqp.iter_deqp_test_cases(
             deqp.gen_caselist_txt(_CTS_BIN, 'GL45-CTS-cases.txt', _EXTRA_ARGS)),
     ),
-    DEQPCTSTest)
+    single=DEQPCTSSingleTest, group=DEQPCTSGroupTest)