[Piglit] [PATCH 10/11] all.tests: Add all the vpfpgeneric tests implicitly.

Paul Berry stereotype441 at gmail.com
Fri Feb 24 14:09:18 PST 2012


On 1 February 2012 16:06, Kenneth Graunke <kenneth at whitecape.org> wrote:

> If you drop a new .vpfp file into tests/shaders/generic, presumably
> it's a new vpfpgeneric test you'd like tested.  Eliminates the fuss
> of having to enumerate each new test in all.tests explicitly.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  tests/all.tests |   51 ++++++---------------------------------------------
>  1 files changed, 6 insertions(+), 45 deletions(-)
>
> diff --git a/tests/all.tests b/tests/all.tests
> index 5843080..c468abd 100644
> --- a/tests/all.tests
> +++ b/tests/all.tests
> @@ -502,51 +502,12 @@ add_plain_test(shaders, 'useshaderprogram-bad-type')
>  add_plain_test(shaders, 'useshaderprogram-bad-program')
>  add_plain_test(shaders, 'useshaderprogram-flushverts-1')
>
> -vpfpgeneric = Group()
> -def add_vpfpgeneric(name):
> -       vpfpgeneric[name] = PlainExecTest(['vpfp-generic', '-auto',
> testsDir + '/shaders/generic/' + name + '.vpfp'])
> -add_vpfpgeneric('arl')
> -add_vpfpgeneric('big-param')
> -add_vpfpgeneric('dataflow-bug')
> -add_vpfpgeneric('fdo30337a')
> -add_vpfpgeneric('fdo30337b')
> -add_vpfpgeneric('fdo38145')
> -add_vpfpgeneric('fogcoord-dp3')
> -add_vpfpgeneric('fogcoord-dph')
> -add_vpfpgeneric('fogcoord-dp4')
> -add_vpfpgeneric('fp-arb-fragment-coord-conventions-none')
> -add_vpfpgeneric('fp-arb-fragment-coord-conventions-integer')
> -add_vpfpgeneric('fp-cmp')
> -add_vpfpgeneric('fp-dst-aliasing-1')
> -add_vpfpgeneric('fp-dst-aliasing-2')
> -add_vpfpgeneric('fp-ex2-sat')
> -add_vpfpgeneric('fp-two-constants')
> -add_vpfpgeneric('nv-mov')
> -add_vpfpgeneric('nv-add')
> -add_vpfpgeneric('nv-arl')
> -add_vpfpgeneric('nv-init-zero-reg')
> -add_vpfpgeneric('nv-init-zero-addr')
> -add_vpfpgeneric('vp-arl-constant-array')
> -add_vpfpgeneric('vp-arl-constant-array-huge')
> -add_vpfpgeneric('vp-arl-constant-array-huge-varying')
> -add_vpfpgeneric('vp-arl-constant-array-huge-offset')
> -add_vpfpgeneric('vp-arl-constant-array-huge-offset-neg')
> -add_vpfpgeneric('vp-arl-constant-array-huge-overwritten')
> -add_vpfpgeneric('vp-arl-constant-array-huge-relative-offset')
> -add_vpfpgeneric('vp-arl-constant-array-varying')
> -add_vpfpgeneric('vp-arl-env-array')
> -add_vpfpgeneric('vp-arl-local-array')
> -add_vpfpgeneric('vp-arl-neg-array')
> -add_vpfpgeneric('vp-arl-neg-array-2')
> -add_vpfpgeneric('vp-constant-array')
> -add_vpfpgeneric('vp-constant-array-huge')
> -add_vpfpgeneric('vp-constant-negate')
> -add_vpfpgeneric('vp-exp-alias')
> -add_vpfpgeneric('vp-max')
> -add_vpfpgeneric('vp-min')
> -add_vpfpgeneric('vp-sge-alias')
> -add_vpfpgeneric('vp-two-constants')
> -shaders['vpfp-generic'] = vpfpgeneric
> +# Add the vpfpgeneric tests:
> +for shader in glob(path.join('tests', 'shaders', 'generic', '*.vpfp')):
> +       test = PlainExecTest('vpfp-generic -auto ' + shader)
> +       test.runConcurrent = True
> +       name = path.splitext(path.relpath(shader,
> 'tests').replace('/generic', '/vpfp-generic'))[0]
>

These two uses of 'tests' should also be changed to testsDir.

With that change:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>


> +       profile.test_list[name] = test
>
>  bugs = Group()
>  add_plain_test(bugs, 'crash-cubemap-order')
> --
> 1.7.7.6
>
> _______________________________________________
> 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/20120224/4e810b9f/attachment.htm>


More information about the Piglit mailing list