[Piglit] [PATCH 1/1] cl: Run concurrent on Linux render nodes, or non-Linux

Dylan Baker baker.dylan.c at gmail.com
Fri Sep 26 16:16:51 PDT 2014


On Friday, September 26, 2014 07:02:49 PM Jan Vesely wrote:
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
> 
> Something like this?
> 
>  tests/cl.py | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/cl.py b/tests/cl.py
> index f618f59..2d3c930 100644
> --- a/tests/cl.py
> +++ b/tests/cl.py
> @@ -7,6 +7,9 @@ __all__ = ['profile']
>  import os
>  import os.path as path
>  
> +import platform
> +import glob
> +
>  from framework.opencv import add_opencv_tests
>  
>  from framework.profile import TestProfile
> @@ -16,13 +19,9 @@ from framework.exectest import PiglitTest
>  # Helper functions
>  
>  def add_plain_test(group, name, args):
> -        group[name] = PiglitTest(args)
> -
> -# TODO: Use concurrent tests for everything once kernels with render nodes
> -# enabled by default (3.16 or newer) are more widely used.
> -def add_concurrent_test(group, name, args):
> -        test = PiglitTest(args, run_concurrent=True)
> -        group[name] = test
> +        group[name] = PiglitTest(args, run_concurrent=
> +		platform.system().lower()[0:5] != 'linux' or
> +		glob.glob('/dev/dri/render*'))

Isn't that going to be re-evaluated every time you call
add_concurrent_test? I would think evaluating that once as a module
constant would be better.

>  
>  def add_plain_program_tester_test(group, name, path):
>          add_plain_test(group, name, ['cl-program-tester', path])
> -- 
> 1.9.3
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140926/8ea470bf/attachment-0001.sig>


More information about the Piglit mailing list