[Piglit] [PATCH 2/2] Plug the built-in test generator to the CL test list.

Tom Stellard tom at stellard.net
Mon Mar 11 07:08:39 PDT 2013


On Fri, Mar 08, 2013 at 10:04:38PM -0600, Aaron Watry wrote:
> This isn't necessarily the prettiest way to do it, but it gets the job done.
> ---
>  tests/all_cl.tests |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/tests/all_cl.tests b/tests/all_cl.tests
> index 267f969..72c9176 100644
> --- a/tests/all_cl.tests
> +++ b/tests/all_cl.tests
> @@ -4,10 +4,13 @@
>  
>  import os
>  import os.path as path
> +import sys
>  
>  from framework.core import *
>  from framework.exectest import *
>  
> +from subprocess import call
> +
>  ######
>  # Helper functions
>  
> @@ -104,3 +107,14 @@ program["Execute"] = program_execute
>  add_program_test_dir(program_build, 'tests/cl/program/build')
>  add_program_test_dir(program_build_fail, 'tests/cl/program/build/fail')
>  add_program_test_dir(program_execute, 'tests/cl/program/execute')
> +
> +#Generate the builtin tests
> +origWD = os.getcwd() # remember our original working directory
> +os.chdir(os.path.join(os.path.abspath(sys.path[0]), 'tests/cl/program/execute/builtin_functions'))
> +subprocess.call("/usr/bin/env python generate-int-builtins.py".split(), shell=False) 
> +os.chdir(origWD) # get back to our original working directory
> +

It looks like the generated GLSL tests are generated at compile-time
rather than run-time, I think we should follow this same convention for
the OpenCL tests.

-Tom

> +#Run built-in tests
> +program_execute_builtin = Group()
> +program["Execute"]["Builtin"] = program_execute_builtin
> +add_program_test_dir(program_execute_builtin, 'tests/cl/program/execute/builtin_functions')
> \ No newline at end of file
> -- 
> 1.7.4.4
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list