[Piglit] Proposal to embed glslparsertest specifications into shader source files

Eric Anholt eric at anholt.net
Tue Nov 30 22:09:12 PST 2010

On Mon, 29 Nov 2010 16:04:47 -0800, Chad Versace <chad at chad-versace.us> wrote:
> Hash: SHA1
> (A proposal to make Piglit a little easier to use... Please send me your
> feedback.)
> The format for glslparsertests is suboptimal; the test specification
> (pass/fail, required GLSL version) is not located in the test file
> itself. This divorce between test and specification causes frequent
> maintenance and testing annoyances (How many times have you opened a
> failing glslparsertest shader file, only to discover that the author
> neglected to comment whether the test should pass or fail?)
> I propose that we embed each test specification into the shader source
> file itself as a specially formatted comment block, and cease to
> register the specifications in /tests/glslparsertest.tests.
> What follows is an overview of the new test file format and of the
> proposal's implementation.
> As for the work involved, it has already been done. In an experimental
> Piglit branch [1] [2], all of the below has been implemented and all
> pre-existing glslparertests converted to the new format. No testing
> quirks have been introduced; test results are identical between master
> and the experimental branch.

Sounds pretty nice.  Though that gets me to thinking: Maybe for these
parser-test and shader_runner tests, we could have the test harness just
automatically add all the *.shader_test or whatever in the directory as
tests to be run in that directory's group?  That way we can add new
tests without typoing the name in all.tests.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20101130/aa70bce0/attachment.pgp>

More information about the Piglit mailing list