[PATCH] vulkan: Prefix group names for VkRunner tests with “vulkan”

Dylan Baker dylan at pnwbakers.com
Tue Nov 13 21:42:13 UTC 2018


Quoting Neil Roberts (2018-11-13 12:50:16)
> This will make it easier to distinguish tests written for Vulkan. It
> makes a bit of an inconsistency because the GL and CL tests don\u2019t have
> any prefix. Ideally maybe we would add a prefix for those too, but
> changing the test names at this late stage would probably cause a lot
> of hassle.
> 
> Adding the prefix will avoid problems if we eventually decide to merge
> the Vulkan profile into the \u201cquick\u201d profile because otherwise we risk
> having name collisions when the same thing is tested on both Vulkan
> and GL.
> ---
>  tests/vulkan.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/vulkan.py b/tests/vulkan.py
> index eed199c55..ae01677a9 100644
> --- a/tests/vulkan.py
> +++ b/tests/vulkan.py
> @@ -21,7 +21,8 @@ profile = TestProfile()
>  for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]:
>      _basedir = os.path.join(basedir, 'vulkan')
>      for dirpath, _, filenames in os.walk(_basedir):
> -        groupname = grouptools.from_path(os.path.relpath(dirpath, _basedir))
> +        groupname = ('vulkan' + grouptools.SEPARATOR +
> +                     grouptools.from_path(os.path.relpath(dirpath, _basedir)))

There's a grouptools.join function for this:

groupname = grouptools.join('vulkan', grouptools.from_path(...))

With that change:
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

Thanks for following up on this.

>          dirname = os.path.relpath(dirpath, os.path.join(basedir, '..'))
>          for filename in filenames:
>              testname, ext = os.path.splitext(filename)
> -- 
> 2.17.1
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20181113/fcaab4f3/attachment.sig>


More information about the Piglit mailing list