[Piglit] [PATCH] tests/all: Use grouptools.join for glx_ext_import_context.

Jose Fonseca jfonseca at vmware.com
Wed Mar 11 04:06:43 PDT 2015

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

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

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'],
-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')] = \
                  require_platforms=['glx', 'mixed_glx_egl'],
-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(
-        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)

More information about the Piglit mailing list