Re: [Piglit] [PATCH] unittests: mustpass is a text list

2018-04-20 Thread Dylan Baker
Quoting Juan A. Suarez Romero (2018-04-19 00:44:04)
> 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("""\
> -
> - appPackageName="com.freedesktop.org.piglit.deqp" testType="deqpTest" 
> xmlns:deqp="http://drawelements.com/deqp"; deqp:glesVersion="196608">
> -
> -
> -
> -
> -
> -
> -
> -
> -
> -
> -
> -
> -
> -""")
> +_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',
> -- 
> 2.14.3
> 

Oops! Thanks for fixing this.

Reviewed-by: Dylan Baker 


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] unittests: mustpass is a text list

2018-04-20 Thread Andres Gomez
This is:

Reviewed-by: Andres Gomez 

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("""\
> -
> - appPackageName="com.freedesktop.org.piglit.deqp" testType="deqpTest" 
> xmlns:deqp="http://drawelements.com/deqp"; deqp:glesVersion="196608">
> -
> -
> -
> -
> -
> -
> -
> -
> -
> -
> -
> -
> -
> -""")
> +_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
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit