Re: [Piglit] [PATCH] deqp: Add test profile for external dEQP-GLES3 tests (v4)

2014-12-17 Thread Mason, Michael W
Reviewed-by: Michael W Mason 

I ran this on link-freon and it  worked as expected.  Thanks Chad!

> -Original Message-
> From: Chad Versace [mailto:chad.vers...@linux.intel.com]
> Sent: Tuesday, December 16, 2014 1:49 PM
> To: piglit@lists.freedesktop.org
> Cc: Chad Versace; Baker, DylanX C; Mason, Michael W
> Subject: [PATCH] deqp: Add test profile for external dEQP-GLES3 tests (v4)
> 
> Google opensourced the drawElements Quality Product Testsuite (dEQP) as part 
> of the Android Lollipop release. It's git
> repo lives in the Android tree at 
> [https://android.googlesource.com/platform/external/deqp/].
> 
> This patch adds a new module, deqp_gles3.py, that runs the dEQP-GLES3 tests.  
> It queries the 'deqp-gles3' executable at
> runtime for the list of testcases.  The module attempts queries the 
> 'deqp-gles3' executable only if the environment
> variable PIGLIT_DEQP_GLES3_EXE or the piglit.conf option deqp-gles3.exe is 
> set.
> 
> Why do we need to use Pigit as the testrunner for dEQP? (After all, dEQP has 
> its own testrunner). Because dEQP runs all
> tests in a single process. If test
> 17530 of 55409 crashes, then the dEQP testrunner crashes and the remaining 
> tests never run. Piglit doesn't suffer from that
> problem, because it runs each test as a separate process.
> 
> Tested on Intel Ivybridge by running the command
> piglit run -t dEQP-GLES3/info/vendor \
>   tests/deqp_gles3.py tests/quick.py results with and without 
> PIGLIT_DEQP_GLES3_EXE set and with and without
> piglit.conf:deqp-gles.exe set. Also tested with various combinations of valid 
> and invalid values for
> PIGLIT_DEQP_GLES_EXTRA_ARGS and piglit.conf:deqp-gles.extra_args.
> 
> Cc: Dylan Baker 
> Cc: Michael W Mason 
> Signed-off-by: Chad Versace 
> ---
> 
> v2:
> - Remove unused imports (dcbaker)
> - Remove extra newlines (dcbaker)
> - Don't use 'global' keyword (dcbaker)
> - Use global constant for DEQP_GLES3_EXE (dcbaker)
> - Fix DEQPTest.interpret_result to correctly parse test output. (mwmason)
> - Use 'super' keyword (dcbaker)
> 
> v3:
> - Fix misnamed variable s/caselist_txt/caselist_path/. (mwmason)
> 
> v4:
> - Add option piglit.conf:extra_args and env var
>   PIGLIT_DEQP_GLES3_EXTRA_ARGS. (requested by mwmason)
> - Remove '--deqp-visibility=hidden'. (mwmason)
> - Fixed exception handling in func get_option.
> 
> 
>  piglit.conf.example |  12 +
>  tests/deqp_gles3.py | 139 
> 
>  2 files changed, 151 insertions(+)
>  create mode 100644 tests/deqp_gles3.py
> 
> diff --git a/piglit.conf.example b/piglit.conf.example index a864c01..b3869c2 
> 100644
> --- a/piglit.conf.example
> +++ b/piglit.conf.example
> @@ -33,6 +33,18 @@ bindir=/home/usr/oclconform  testA  testB
> 
> +;[deqp-gles3]
> +;
> +; Path to the deqp-gles3 executable. You can also set this with the
> +environment ; variable PIGLIT_DEQP_GLES3_EXE. Piglit will run the
> +dEQP-GLES3 tests if and ; only if this option is set.
> +;exe=/home/knuth/deqp/modules/gles3/deqp-gles3
> +;
> +; Space-separated list of extra command line arguments for deqp-gles3.
> +The ; option is not required. The environment variable
> +PIGLIT_DEQP_GLES3_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
> diff --git a/tests/deqp_gles3.py b/tests/deqp_gles3.py new file mode 100644 
> index 000..b1bb33b
> --- /dev/null
> +++ b/tests/deqp_gles3.py
> @@ -0,0 +1,139 @@
> +# Copyright 2014 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.
> +
> +import ConfigParser
> +import os
> +import subprocess
> +
> +# Piglit modules
> +import framework
> +from framework.profile import Test, TestProfile
> +
> +__

Re: [Piglit] [PATCH] deqp: Add test profile for external dEQP-GLES3 tests (v4)

2014-12-16 Thread Dylan Baker
On Tuesday, December 16, 2014 02:52:08 PM Chad Versace wrote:
> On 12/16/2014 02:10 PM, Dylan Baker wrote:
> > On Tuesday, December 16, 2014 01:49:20 PM Chad Versace wrote:
> 
> >> +try:
> >> +opt = framework.core.PIGLIT_CONFIG.get(config_option[0],
> >> +   config_option[1])
> >> +except ConfigParser.NoSectionError:
> >> +pass
> >> +except ConfigParser.NoOptionError:
> >> +pass
> > 
> > You should combine these
> 
> What's the syntax? I tried
> 
> except ConfigParser.NoSectionError, ConfigParser.NoOptionError:
> pass
> 
> but that failed to catch ConfigParser.NoOptionError.
> 
It requires that the tuple have the () around it.

except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
pass

This is because of the legacy "except Exception, e" syntax.


signature.asc
Description: This is a digitally signed message part.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] deqp: Add test profile for external dEQP-GLES3 tests (v4)

2014-12-16 Thread Chad Versace
On 12/16/2014 02:10 PM, Dylan Baker wrote:
> On Tuesday, December 16, 2014 01:49:20 PM Chad Versace wrote:

>> +try:
>> +opt = framework.core.PIGLIT_CONFIG.get(config_option[0],
>> +   config_option[1])
>> +except ConfigParser.NoSectionError:
>> +pass
>> +except ConfigParser.NoOptionError:
>> +pass
> 
> You should combine these

What's the syntax? I tried

except ConfigParser.NoSectionError, ConfigParser.NoOptionError:
pass

but that failed to catch ConfigParser.NoOptionError.



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


Re: [Piglit] [PATCH] deqp: Add test profile for external dEQP-GLES3 tests (v4)

2014-12-16 Thread Dylan Baker
On Tuesday, December 16, 2014 01:49:20 PM Chad Versace wrote:
> Google opensourced the drawElements Quality Product Testsuite (dEQP) as
> part of the Android Lollipop release. It's git repo lives in the Android
> tree at [https://android.googlesource.com/platform/external/deqp/].
> 
> This patch adds a new module, deqp_gles3.py, that runs the dEQP-GLES3
> tests.  It queries the 'deqp-gles3' executable at runtime for the list
> of testcases.  The module attempts queries the 'deqp-gles3' executable
> only if the environment variable PIGLIT_DEQP_GLES3_EXE or the
> piglit.conf option deqp-gles3.exe is set.
> 
> Why do we need to use Pigit as the testrunner for dEQP? (After all, dEQP has
> its own testrunner). Because dEQP runs all tests in a single process. If test
> 17530 of 55409 crashes, then the dEQP testrunner crashes and the remaining
> tests never run. Piglit doesn't suffer from that problem, because it runs each
> test as a separate process.
> 
> Tested on Intel Ivybridge by running the command
> piglit run -t dEQP-GLES3/info/vendor \
>   tests/deqp_gles3.py tests/quick.py results
> with and without PIGLIT_DEQP_GLES3_EXE set and with and without
> piglit.conf:deqp-gles.exe set. Also tested with various combinations of
> valid and invalid values for PIGLIT_DEQP_GLES_EXTRA_ARGS and
> piglit.conf:deqp-gles.extra_args.
> 
> Cc: Dylan Baker 
> Cc: Michael W Mason 
> Signed-off-by: Chad Versace 
> ---
> 
> v2:
> - Remove unused imports (dcbaker)
> - Remove extra newlines (dcbaker)
> - Don't use 'global' keyword (dcbaker)
> - Use global constant for DEQP_GLES3_EXE (dcbaker)
> - Fix DEQPTest.interpret_result to correctly parse test output. (mwmason)
> - Use 'super' keyword (dcbaker)
> 
> v3:
> - Fix misnamed variable s/caselist_txt/caselist_path/. (mwmason)
> 
> v4:
> - Add option piglit.conf:extra_args and env var
>   PIGLIT_DEQP_GLES3_EXTRA_ARGS. (requested by mwmason)
> - Remove '--deqp-visibility=hidden'. (mwmason)
> - Fixed exception handling in func get_option.
> 
> 
>  piglit.conf.example |  12 +
>  tests/deqp_gles3.py | 139 
> 
>  2 files changed, 151 insertions(+)
>  create mode 100644 tests/deqp_gles3.py
> 
> diff --git a/piglit.conf.example b/piglit.conf.example
> index a864c01..b3869c2 100644
> --- a/piglit.conf.example
> +++ b/piglit.conf.example
> @@ -33,6 +33,18 @@ bindir=/home/usr/oclconform
>  testA
>  testB
>  
> +;[deqp-gles3]
> +;
> +; Path to the deqp-gles3 executable. You can also set this with the 
> environment
> +; variable PIGLIT_DEQP_GLES3_EXE. Piglit will run the dEQP-GLES3 tests if and
> +; only if this option is set.
> +;exe=/home/knuth/deqp/modules/gles3/deqp-gles3
> +;
> +; Space-separated list of extra command line arguments for deqp-gles3. The
> +; option is not required. The environment variable 
> PIGLIT_DEQP_GLES3_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
> diff --git a/tests/deqp_gles3.py b/tests/deqp_gles3.py
> new file mode 100644
> index 000..b1bb33b
> --- /dev/null
> +++ b/tests/deqp_gles3.py
> @@ -0,0 +1,139 @@
> +# Copyright 2014 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.
> +
> +import ConfigParser
> +import os
> +import subprocess
> +
> +# Piglit modules
> +import framework
> +from framework.profile import Test, TestProfile
> +
> +__all__ = ['profile']
> +
> +def get_option(env_varname, config_option):
> +"""Query the given environment variable and then piglit.conf for the
> +option. Return None if the option is unset.
> +"""
> +opt = os.environ.get(env_varname, None)
> +if opt is not None:
> +return opt
> +
> +try:
> + 

[Piglit] [PATCH] deqp: Add test profile for external dEQP-GLES3 tests (v4)

2014-12-16 Thread Chad Versace
Google opensourced the drawElements Quality Product Testsuite (dEQP) as
part of the Android Lollipop release. It's git repo lives in the Android
tree at [https://android.googlesource.com/platform/external/deqp/].

This patch adds a new module, deqp_gles3.py, that runs the dEQP-GLES3
tests.  It queries the 'deqp-gles3' executable at runtime for the list
of testcases.  The module attempts queries the 'deqp-gles3' executable
only if the environment variable PIGLIT_DEQP_GLES3_EXE or the
piglit.conf option deqp-gles3.exe is set.

Why do we need to use Pigit as the testrunner for dEQP? (After all, dEQP has
its own testrunner). Because dEQP runs all tests in a single process. If test
17530 of 55409 crashes, then the dEQP testrunner crashes and the remaining
tests never run. Piglit doesn't suffer from that problem, because it runs each
test as a separate process.

Tested on Intel Ivybridge by running the command
piglit run -t dEQP-GLES3/info/vendor \
  tests/deqp_gles3.py tests/quick.py results
with and without PIGLIT_DEQP_GLES3_EXE set and with and without
piglit.conf:deqp-gles.exe set. Also tested with various combinations of
valid and invalid values for PIGLIT_DEQP_GLES_EXTRA_ARGS and
piglit.conf:deqp-gles.extra_args.

Cc: Dylan Baker 
Cc: Michael W Mason 
Signed-off-by: Chad Versace 
---

v2:
- Remove unused imports (dcbaker)
- Remove extra newlines (dcbaker)
- Don't use 'global' keyword (dcbaker)
- Use global constant for DEQP_GLES3_EXE (dcbaker)
- Fix DEQPTest.interpret_result to correctly parse test output. (mwmason)
- Use 'super' keyword (dcbaker)

v3:
- Fix misnamed variable s/caselist_txt/caselist_path/. (mwmason)

v4:
- Add option piglit.conf:extra_args and env var
  PIGLIT_DEQP_GLES3_EXTRA_ARGS. (requested by mwmason)
- Remove '--deqp-visibility=hidden'. (mwmason)
- Fixed exception handling in func get_option.


 piglit.conf.example |  12 +
 tests/deqp_gles3.py | 139 
 2 files changed, 151 insertions(+)
 create mode 100644 tests/deqp_gles3.py

diff --git a/piglit.conf.example b/piglit.conf.example
index a864c01..b3869c2 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -33,6 +33,18 @@ bindir=/home/usr/oclconform
 testA
 testB
 
+;[deqp-gles3]
+;
+; Path to the deqp-gles3 executable. You can also set this with the environment
+; variable PIGLIT_DEQP_GLES3_EXE. Piglit will run the dEQP-GLES3 tests if and
+; only if this option is set.
+;exe=/home/knuth/deqp/modules/gles3/deqp-gles3
+;
+; Space-separated list of extra command line arguments for deqp-gles3. The
+; option is not required. The environment variable PIGLIT_DEQP_GLES3_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
diff --git a/tests/deqp_gles3.py b/tests/deqp_gles3.py
new file mode 100644
index 000..b1bb33b
--- /dev/null
+++ b/tests/deqp_gles3.py
@@ -0,0 +1,139 @@
+# Copyright 2014 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.
+
+import ConfigParser
+import os
+import subprocess
+
+# Piglit modules
+import framework
+from framework.profile import Test, TestProfile
+
+__all__ = ['profile']
+
+def get_option(env_varname, config_option):
+"""Query the given environment variable and then piglit.conf for the
+option. Return None if the option is unset.
+"""
+opt = os.environ.get(env_varname, None)
+if opt is not None:
+return opt
+
+try:
+opt = framework.core.PIGLIT_CONFIG.get(config_option[0],
+   config_option[1])
+except ConfigParser.NoSectionError:
+pass
+except ConfigParser.NoOptionError:
+pass
+
+return opt
+
+
+# Path to the deqp-gles3 executable.
+DEQP_GLES3_EXE = get_option('PIGLIT