[3/5] tests/deqp_gles31.py: Add support for running the gles31 tests from deqp

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

Details

Message ID 1432243123-29646-4-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 doesn't currently work with mesa, since mesa doesn't expose a
GLES3.1 context

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

Patch hide | download patch | download mbox

diff --git a/piglit.conf.example b/piglit.conf.example
index c30eef4..5305c53 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -51,6 +51,16 @@  testB
 ;mustpasslist= \
 ; /android/platform/external/deqp/android/cts/com.drawelements.deqp.gles3.xml
 
+[deqp-gles31]
+; Path to the deqp-gles31 executable
+; Can be overwritten by PIGLIT_DEQP_GLES31_BIN environment variable
+;bin=/home/knuth/deqp/modules/gles31/deqp-gles31
+
+; 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
+
 ; Section for specific oclconform test.  One of these sections is required for
 ; each test list in the oclconform section and must be called:
 ; oclconform-$testname
@@ -100,4 +110,4 @@  run_test=./%(test_name)s
 
 [expected-crashes]
 ; Like expected-failures, but specifies that a test is expected to
-; crash.
\ No newline at end of file
+; crash.
diff --git a/tests/deqp_gles31.py b/tests/deqp_gles31.py
new file mode 100644
index 0000000..a2c13ef
--- /dev/null
+++ b/tests/deqp_gles31.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 GLES31 tests."""
+
+from framework.test import deqp
+
+__all__ = ['profile']
+
+
+# Path to the deqp-gles3 executable.
+_DEQP_GLES31_BIN = deqp.get_option('PIGLIT_DEQP_GLES31_BIN',
+                                   ('deqp-gles31', 'bin'))
+
+
+class DEQPGLES31Test(deqp.DEQPBaseTest):
+    deqp_bin = _DEQP_GLES31_BIN
+    extra_args = deqp.get_option('PIGLIT_DEQP_GLES31_EXTRA_ARGS',
+                                 ('deqp-gles31', 'extra_args')) or []
+
+
+profile = deqp.make_profile(  # pylint: disable=invalid-name
+    deqp.iter_deqp_test_cases(
+        deqp.gen_caselist_txt(_DEQP_GLES31_BIN, 'dEQP-GLES31-cases.txt')),
+    DEQPGLES31Test)