[Piglit] [PATCH 1/4] piglt: Add support for subtests
Eric Anholt
eric at anholt.net
Wed Dec 5 11:27:06 PST 2012
Tom Stellard <tom at stellard.net> writes:
> From: Tom Stellard <thomas.stellard at amd.com>
>
> Subtests allow a test to produce more than one result. This is useful
> for tests where it may be convenient to combine several somewhat
> unrelated tests into a single program. For example, a cl test like:
>
> kernel void test(TYPE *out, TYPE *in) {
> out[0] = some_builtin_function(in[0], in[1]);
> }
>
> That uses only one kernel, but recompiles it several times with different
> definitions of the macro 'TYPE' in order to test the builtin with all
> the possible types.
>
> To take advantage of the subtest feature, programs should output an
> additional PIGLIT line similar to the following example:
>
> PIGLIT: {'subtests' : {'testA' : 'pass', 'testB : 'fail'}}
This sounds pretty cool. The downside I see is that a lot of tests that
might use it that are structured a loop executing subtests will have to
save off the results so it can accumulate them into a string later. How
about instead separate lines:
PIGLIT subtest testA: pass
PIGLIT subtest testB: fail
which means we could have a nice helper function for
piglit_report_subtest_result(const char *name, enum piglit_result result)
-------------- 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/20121205/5e4afb2f/attachment.pgp>
More information about the Piglit
mailing list