[4/5] tests/deqp_gles2.py: add support for deqp gles2 tests

Submitted by Dylan Baker on May 21, 2015, 9:18 p.m.

Details

Message ID 1432243123-29646-5-git-send-email-baker.dylan.c@gmail.com
State New, archived
Headers show

Not browsing as part of any series.

Commit Message

Dylan Baker May 21, 2015, 9:18 p.m.
This adds support for running deqp's gles2 tests. This is verified
working.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
---
 piglit.conf.example | 10 ++++++++++
 tests/deqp_gles2.py | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 tests/deqp_gles2.py

Patch hide | download patch | download mbox

diff --git a/piglit.conf.example b/piglit.conf.example
index 5305c53..9606272 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -33,6 +33,16 @@  bindir=/home/usr/oclconform
 testA
 testB
 
+[deqp-gles2]
+; Path to the deqp-gles2 executable
+; Can be overwritten by PIGLIT_DEQP_GLES2_BIN environment variable
+;bin=/home/knuth/deqp/modules/gles2/deqp-gles2
+
+; Space-separated list of extra command line arguments for deqp-gles31. The
+; option is not required. The environment variable PIGLIT_DEQP_GLES31_EXTRA_ARGS
+; overrides the value set here.
+;extra_args=--deqp-visibility hidden
+
 ;[deqp-gles3]
 ;
 ; Path to the deqp-gles3 executable. You can also set this with the environment
diff --git a/tests/deqp_gles2.py b/tests/deqp_gles2.py
new file mode 100644
index 0000000..1ae0381
--- /dev/null
+++ b/tests/deqp_gles2.py
@@ -0,0 +1,42 @@ 
+# Copyright 2015 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
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+"""Piglit integrations for dEQP GLES2 tests."""
+
+from framework.test import deqp
+
+__all__ = ['profile']
+
+
+# Path to the deqp-gles2 executable.
+_DEQP_GLES2_BIN = deqp.get_option('PIGLIT_DEQP_GLES2_BIN',
+                                  ('deqp-gles2', 'bin'))
+
+
+class DEQPGLES2Test(deqp.DEQPBaseTest):
+    deqp_bin = _DEQP_GLES2_BIN
+    extra_args = deqp.get_option('PIGLIT_DEQP_GLES2_EXTRA_ARGS',
+                                 ('deqp-gles2', 'extra_args')) or []
+
+
+profile = deqp.make_profile(  # pylint: disable=invalid-name
+    deqp.iter_deqp_test_cases(
+        deqp.gen_caselist_txt(_DEQP_GLES2_BIN, 'dEQP-GLES2-cases.txt')),
+    DEQPGLES2Test)