[Piglit] [PATCH] Add a new test profile: gpu.tests.

Kenneth Graunke kenneth at whitecape.org
Thu Jun 13 14:48:13 PDT 2013


Often, I make changes to Mesa which only affect tests that actually
execute on the GPU.  For such changes, there's no real benefit to
running compiler-only/front-end tests, such as glslparsertest and
asmparsertest files.  There are a lot of those, so cutting them can save
quite a bit of time when running Piglit.

Excluding glslparsertests via -x is tricky since a lot of them live way
down in the spec/... hierarchy.  It's much easier to filter them out by
checking for the GLSLParserTest class.

Essentially, gpu.tests is quick.tests minus compiler-only tests.  In the
future, we could probably remove API-only tests (though there are a much
smaller number of those and they run fairly quickly).

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 tests/gpu.tests | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 tests/gpu.tests

This may be kind of redundant with quick-driver.tests, but the subset is
a little different.  I do want to run streaming-texture-leak, but I don't
want to run parsertests.  Would people prefer making changes to
quick-driver.tests rather than making a new one?

Thanks for the thoughts!

diff --git a/tests/gpu.tests b/tests/gpu.tests
new file mode 100644
index 0000000..d30f1b9
--- /dev/null
+++ b/tests/gpu.tests
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+
+# quick.tests minus compiler tests.
+
+from framework.glsl_parser_test import GLSLParserTest
+import os.path
+
+global profile
+
+execfile(os.path.dirname(__file__) + '/quick.tests')
+
+# Drop these as they're basically compiler tests and take forever.
+del profile.tests['shaders']['glsl-fs-inline-explosion']
+del profile.tests['shaders']['glsl-fs-unroll-explosion']
+del profile.tests['shaders']['glsl-vs-inline-explosion']
+del profile.tests['shaders']['glsl-vs-unroll-explosion']
+
+# Drop ARB_vertex_program/ARB_fragment_program compiler tests.
+del profile.tests['asmparsertest']
+
+# Flatten the tree of groups now so we can filter out tests more easily.
+profile.flatten_group_hierarchy()
+
+# Filter out any GLSLParserTest instances, as they're compiler tests.
+profile.test_list = dict([(n,t) for (n,t) in profile.test_list.items() if
+                          not isinstance(t, GLSLParserTest)])
+
-- 
1.8.3



More information about the Piglit mailing list