On 1 February 2012 16:06, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you drop a new .vpfp file into tests/shaders/generic, presumably<br>
it's a new vpfpgeneric test you'd like tested. Eliminates the fuss<br>
of having to enumerate each new test in all.tests explicitly.<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
tests/all.tests | 51 ++++++---------------------------------------------<br>
1 files changed, 6 insertions(+), 45 deletions(-)<br>
<br>
diff --git a/tests/all.tests b/tests/all.tests<br>
index 5843080..c468abd 100644<br>
--- a/tests/all.tests<br>
+++ b/tests/all.tests<br>
@@ -502,51 +502,12 @@ add_plain_test(shaders, 'useshaderprogram-bad-type')<br>
add_plain_test(shaders, 'useshaderprogram-bad-program')<br>
add_plain_test(shaders, 'useshaderprogram-flushverts-1')<br>
<br>
-vpfpgeneric = Group()<br>
-def add_vpfpgeneric(name):<br>
- vpfpgeneric[name] = PlainExecTest(['vpfp-generic', '-auto', testsDir + '/shaders/generic/' + name + '.vpfp'])<br>
-add_vpfpgeneric('arl')<br>
-add_vpfpgeneric('big-param')<br>
-add_vpfpgeneric('dataflow-bug')<br>
-add_vpfpgeneric('fdo30337a')<br>
-add_vpfpgeneric('fdo30337b')<br>
-add_vpfpgeneric('fdo38145')<br>
-add_vpfpgeneric('fogcoord-dp3')<br>
-add_vpfpgeneric('fogcoord-dph')<br>
-add_vpfpgeneric('fogcoord-dp4')<br>
-add_vpfpgeneric('fp-arb-fragment-coord-conventions-none')<br>
-add_vpfpgeneric('fp-arb-fragment-coord-conventions-integer')<br>
-add_vpfpgeneric('fp-cmp')<br>
-add_vpfpgeneric('fp-dst-aliasing-1')<br>
-add_vpfpgeneric('fp-dst-aliasing-2')<br>
-add_vpfpgeneric('fp-ex2-sat')<br>
-add_vpfpgeneric('fp-two-constants')<br>
-add_vpfpgeneric('nv-mov')<br>
-add_vpfpgeneric('nv-add')<br>
-add_vpfpgeneric('nv-arl')<br>
-add_vpfpgeneric('nv-init-zero-reg')<br>
-add_vpfpgeneric('nv-init-zero-addr')<br>
-add_vpfpgeneric('vp-arl-constant-array')<br>
-add_vpfpgeneric('vp-arl-constant-array-huge')<br>
-add_vpfpgeneric('vp-arl-constant-array-huge-varying')<br>
-add_vpfpgeneric('vp-arl-constant-array-huge-offset')<br>
-add_vpfpgeneric('vp-arl-constant-array-huge-offset-neg')<br>
-add_vpfpgeneric('vp-arl-constant-array-huge-overwritten')<br>
-add_vpfpgeneric('vp-arl-constant-array-huge-relative-offset')<br>
-add_vpfpgeneric('vp-arl-constant-array-varying')<br>
-add_vpfpgeneric('vp-arl-env-array')<br>
-add_vpfpgeneric('vp-arl-local-array')<br>
-add_vpfpgeneric('vp-arl-neg-array')<br>
-add_vpfpgeneric('vp-arl-neg-array-2')<br>
-add_vpfpgeneric('vp-constant-array')<br>
-add_vpfpgeneric('vp-constant-array-huge')<br>
-add_vpfpgeneric('vp-constant-negate')<br>
-add_vpfpgeneric('vp-exp-alias')<br>
-add_vpfpgeneric('vp-max')<br>
-add_vpfpgeneric('vp-min')<br>
-add_vpfpgeneric('vp-sge-alias')<br>
-add_vpfpgeneric('vp-two-constants')<br>
-shaders['vpfp-generic'] = vpfpgeneric<br>
+# Add the vpfpgeneric tests:<br>
+for shader in glob(path.join('tests', 'shaders', 'generic', '*.vpfp')):<br>
+ test = PlainExecTest('vpfp-generic -auto ' + shader)<br>
+ test.runConcurrent = True<br>
+ name = path.splitext(path.relpath(shader, 'tests').replace('/generic', '/vpfp-generic'))[0]<br></blockquote><div><br>These two uses of 'tests' should also be changed to testsDir.<br>
<br>With that change:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+ profile.test_list[name] = test<br>
<br>
bugs = Group()<br>
add_plain_test(bugs, 'crash-cubemap-order')<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.7.6<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br>