[Piglit] [PATCH] unittests: mustpass is a text list
Andres Gomez
agomez at igalia.com
Fri Apr 20 13:39:08 UTC 2018
This is:
Reviewed-by: Andres Gomez <agomez at igalia.com>
On Thu, 2018-04-19 at 09:44 +0200, Juan A. Suarez Romero wrote:
> Commit 7cf9e743a updated deqp mustpass lists to use text based mustpass.
>
> Hence unit tests should use text based mustpass too.
>
> Fixes: 7cf9e743a ("framework: update deqp mustpass list for text based
> mustpass")
> ---
> unittests/framework/test/test_deqp.py | 28 +++++++++-------------------
> 1 file changed, 9 insertions(+), 19 deletions(-)
>
> diff --git a/unittests/framework/test/test_deqp.py b/unittests/framework/test/test_deqp.py
> index 1eb84b13f..1c24ab365 100644
> --- a/unittests/framework/test/test_deqp.py
> +++ b/unittests/framework/test/test_deqp.py
> @@ -299,28 +299,18 @@ class TestDEQPBaseTest(object):
> 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>
> - """)
> + _txt = """\
> +dEQP.piglit.group1.test1
> +dEQP.piglit.group1.test2
> +dEQP.piglit.nested.group2.test3
> +dEQP.piglit.nested.group2.test4
> + """
>
> def test_basic(self, tmpdir):
> - p = tmpdir.join('foo.xml')
> - p.write(self._xml)
> + p = tmpdir.join('foo.txt')
> + p.write(self._txt)
> tests = set(deqp.gen_mustpass_tests(six.text_type(p)))
> + print(tests)
> assert tests == {
> 'dEQP.piglit.group1.test1',
> 'dEQP.piglit.group1.test2',
--
Br,
Andres
More information about the Piglit
mailing list