summaryrefslogtreecommitdiff
path: root/unittests/framework
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-08-05 14:14:02 -0700
committerDylan Baker <dylan@pnwbakers.com>2016-08-16 09:46:56 -0700
commit8100a1dd9964b75b93c0a8ca10caa95df315fa0b (patch)
treedf238b9b4f7ca543f56f5600f7d12a77d4da56cd /unittests/framework
parent7baa40674b097b45262c9ae2d45d06ecd1bd8c35 (diff)
framework/test/deqp: generalize mustpass list handling
This patch generalizes the mustpass list functionality in deqp_gles3.py. While the idea is the same, this implementation is considerably different than the version in deqp_gles3, since it bypasses calling the binary to generate a test list altogether, and simply replaces the iter_deqp_test_cases function by providing output that the make_profile function can consume. The end result is that this is simpler (though more LOC are added since this actually has tests), and can be applied to gles2 and gles31. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Diffstat (limited to 'unittests/framework')
-rw-r--r--unittests/framework/test/test_deqp.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/unittests/framework/test/test_deqp.py b/unittests/framework/test/test_deqp.py
index 8e7579acd..1eb84b13f 100644
--- a/unittests/framework/test/test_deqp.py
+++ b/unittests/framework/test/test_deqp.py
@@ -294,3 +294,36 @@ class TestDEQPBaseTest(object):
self.inst.result.out = self.__gen_stdout('ResourceError')
self.inst.interpret_result()
assert self.inst.result.result is status.CRASH
+
+
+class TestGenMustpassTests(object):
+ """Tests for the gen_mustpass_tests function."""
+
+ _xml = textwrap.dedent("""\
+ <?xml version="1.0" encoding="UTF-8"?>
+ <TestPackage name="dEQP-piglit-test" appPackageName="com.freedesktop.org.piglit.deqp" testType="deqpTest" xmlns:deqp="http://drawelements.com/deqp" deqp:glesVersion="196608">
+ <TestSuite name="dEQP.piglit">
+ <TestCase name="group1">
+ <Test name="test1" />
+ <Test name="test2" />
+ </TestCase>
+ <TestSuite name="nested">
+ <TestCase name="group2">
+ <Test name="test3" />
+ <Test name="test4" />
+ </TestCase>
+ </TestSuite>
+ </TestSuite>
+ </TestPackage>
+ """)
+
+ def test_basic(self, tmpdir):
+ p = tmpdir.join('foo.xml')
+ p.write(self._xml)
+ tests = set(deqp.gen_mustpass_tests(six.text_type(p)))
+ assert tests == {
+ 'dEQP.piglit.group1.test1',
+ 'dEQP.piglit.group1.test2',
+ 'dEQP.piglit.nested.group2.test3',
+ 'dEQP.piglit.nested.group2.test4',
+ }