[Piglit] [PATCH 1/3] profile: add the idea of process-isolated xml file

Dylan Baker dylan at pnwbakers.com
Thu May 10 16:41:08 UTC 2018


Marek and Michel,

I meant to CC you both on this series as well. With this you should be able to
run ./piglit gpu outdir --process-isolation=false and get the result you expect.
I've tested the runtime with this series applied and before my 35 patch and it
is pretty close to equivalent.

Dylan

Quoting Dylan Baker (2018-05-09 14:12:21)
> This adds a new name.no_process.xml (or .meta.xml) file that is loaded
> when --process-isolation=false is used.
> ---
>  framework/profile.py | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/framework/profile.py b/framework/profile.py
> index aff0ffa2c..ffc91e0a6 100644
> --- a/framework/profile.py
> +++ b/framework/profile.py
> @@ -56,6 +56,7 @@ from framework.test.piglit_test import (
>  )
>  from framework.test.shader_test import ShaderTest, MultiShaderTest
>  from framework.test.glsl_parser_test import GLSLParserTest
> +from framework.options import OPTIONS
>  
>  __all__ = [
>      'RegexFilter',
> @@ -552,8 +553,22 @@ def load_test_profile(filename, python=None):
>                module. If True, then only python is tried, if False then only
>                XML is tried.
>      """
> -    name = os.path.splitext(os.path.basename(filename))[0]
> +    name, ext = os.path.splitext(os.path.basename(filename))
> +    if ext == '.no_isolation':
> +        name = filename
> +
>      if not python:
> +        # If process-isolation is false then try to load a profile named
> +        # {name}.no_isolation instead. This is only valid for xml based
> +        # profiles.
> +        if ext != '.no_isolation' and not OPTIONS.process_isolation:
> +            try:
> +                return load_test_profile(name + '.no_isolation' + ext, python)
> +            except exceptions.PiglitFatalError:
> +                # There might not be a .no_isolation version, try to load the
> +                # regular version in that case.
> +                pass
> +
>          meta = os.path.join(ROOT_DIR, 'tests', name + '.meta.xml')
>          if os.path.exists(meta):
>              return MetaProfile(meta)
> -- 
> 2.17.0
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- 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/20180510/8139f853/attachment.sig>


More information about the Piglit mailing list