summaryrefslogtreecommitdiff
path: root/unittests/framework/test/test_deqp.py
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/framework/test/test_deqp.py')
-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',
+ }