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

Aaron Watry awatry at gmail.com
Mon Mar 11 08:43:10 PDT 2013


On Mon, Mar 11, 2013 at 9:08 AM, Tom Stellard <tom at stellard.net> wrote:

> 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
>

I fully agree.  I had attempted to do just that and failed miserably since
my automake-foo is weak. I wanted to get the generator itself out for
review, and I at least knew that this method functioned. I am more than
willing to attempt to generate the tests at compile-time, just have to
figure out how to get it to work first.

Oh, and just as a note: Every single one of the generated tests pass in
MacOS 10.7 on a GF 9400m.  Some of the tests fail on the CPU-implementation
of OpenCL on MacOS, but I've verified that each of those failures is a
legitimate bug with Apple's implementation.

Once clover gains vload/vstore support, at least some of these will pass on
r600g, but I haven't yet figured out what the percentage will be.  Once
we've got vload/vstore working, I'll probably try to work on any functions
that libclc is missing.

--Aaron


>
> > +#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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130311/839937d0/attachment.html>


More information about the Piglit mailing list