[Piglit] [PATCH] tests/all: Use grouptools.join for glx_ext_import_context.
Dylan Baker
baker.dylan.c at gmail.com
Wed Mar 11 11:41:19 PDT 2015
I sent you a reply from the wrong account, and it wont show up on list.
for posterity:
Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>
On Wed, Mar 11, 2015 at 11:06:43AM +0000, Jose Fonseca wrote:
> This fixes the following assertion on Windows:
>
> AssertionError: Groups are not paths and cannot contain \. (glx\glx_ext_import_context)
>
> I believe the current implementation of grouptools is unsustainable: it
> fails to spot when people mistakedly use os.path.join on unices, yet
> aborts when it spots '\' on Windows. So, as it currently stands,
> instead of actually detecting misuse of the interface, it's just causing
> grief for Windows users, as they are the only ones that can ever see the
> assertions.
>
> I think that grouptools should either:
>
> a) use a character other than `/` on Posix, so it can spot wrong use of
> os.path.join on unices
>
> b) just silently replace `\` with `/` when (ie, revert to the old
> behavior)
>
> I don't feel strongly either way. But I strongly feel that it can't
> stay as it is.
> ---
> tests/all.py | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/all.py b/tests/all.py
> index 9b2de9a..1c3c889 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -710,15 +710,15 @@ with profile.group_manager(
> g(['glx-string-sanity'], 'extension string sanity')
> add_msaa_visual_plain_tests(g, ['glx-copy-sub-buffer'],
> run_concurrent=False)
> -profile.test_list[os.path.join('glx', 'glx-buffer-age vblank_mode=0')] = \
> +profile.test_list[grouptools.join('glx', 'glx-buffer-age vblank_mode=0')] = \
> PiglitGLTest(['glx-buffer-age'],
> require_platforms=['glx', 'mixed_glx_egl'],
> run_concurrent=False)
> -profile.test_list[os.path.join('glx', 'glx-buffer-age vblank_mode=0')].env['vblank_mode'] = '0'
> +profile.test_list[grouptools.join('glx', 'glx-buffer-age vblank_mode=0')].env['vblank_mode'] = '0'
>
> with profile.group_manager(
> PiglitGLTest,
> - os.path.join('glx', 'glx_ext_import_context'),
> + grouptools.join('glx', 'glx_ext_import_context'),
> require_platforms=['glx', 'mixed_glx_egl']) as g:
> g(['glx-free-context'], 'free context', run_concurrent=False)
> g(['glx-get-context-id'], 'get context ID', run_concurrent=False)
> --
> 2.1.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: Digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150311/78605b49/attachment.sig>
More information about the Piglit
mailing list