[Piglit] [PATCH 2/2] framework: Don't try to parse GL/GLSL version from wflinfo.
Dylan Baker
baker.dylan.c at gmail.com
Mon Dec 7 10:12:54 PST 2015
On Mon, Dec 07, 2015 at 02:26:00PM +0000, Jose Fonseca wrote:
> It's making many assumptions about the wflinfo which are not true.
>
> So completely disable it as a workaround.
>
> Though I wonder if there's really any merit in adding a depending on
> wflinfo. IMO, if piglit cares for the advertised GL/GLSL versions, it
> should have its own internally utility program to dump every thing needed.
> Parsing output from external utilities is begging for trouble.
If you don't have wflinfo, it'll go on and run anyway. It's also
designed to be as conservative as possible with versions, and we should
absolutely try/except the float if a driver doesn't return a sane
version.
Out of curiosity what driver are you using, I tested this extensively
against both i965 and against RadionSI. I had no issues at all, when
anything failed it would simply fall back to running the test and
letting the binary skip itself, as it was designed to do.
FYI:
I asked Chad (who maintains waffle) before I started this, and he made
the assertion that wflinfo output was designed for parsing by external
utilities and was considered API stable.
Also, I would prefer to have some kind of bindings for wflinfo rather
than parsing the string output, the goal was to have JSON interface
(google also wanted this interface for other uses), but neither they nor
I have had time to send anything.
Dylan
> ---
> framework/test/opengl.py | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/framework/test/opengl.py b/framework/test/opengl.py
> index 29da2d1..0a7b2d7 100644
> --- a/framework/test/opengl.py
> +++ b/framework/test/opengl.py
> @@ -80,6 +80,11 @@ class WflInfo(object):
> opts -- arguments to pass to wflinfo other than verbose and platform
>
> """
> +
> + # FIXME: The version parsing below is full of bugs. Disable all
> + # wflinfo invocation until they are addressed
> + raise StopWflinfo('OSError')
> +
> with open(os.devnull, 'w') as d:
> try:
> raw = subprocess.check_output(
> --
> 2.5.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20151207/a29bdb8b/attachment.sig>
More information about the Piglit
mailing list