[Piglit] [PATCH 07/11] all.tests: Work around upcoming capitalization issues before they begin.

Kenneth Graunke kenneth at whitecape.org
Wed Feb 1 16:06:34 PST 2012

In the spec directory, Piglit uses lower case names, such as:


However, in the test hierarchy, it uses upper case names:

  spec                                       6491/6545
    ARB_shader_texture_lod                       60/61

The new test_list structure will be populated with names based on the
file structure, which would make them lowercase.  For compatibility,
we should fix them to remain uppercase.  It's easiest to do that once,
at the end, rather than requiring workarounds in every place that adds

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
 tests/all.tests |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/tests/all.tests b/tests/all.tests
index dac1394..3211016 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -2143,3 +2143,12 @@ for groupname, group in sorted(profile.tests.iteritems()):
 					valgrind[groupname+"/"+testname+"/"+subtestname] = ValgrindExecTest(subtest)
 profile.tests['valgrind'] = valgrind
+# Fix up the capitalization mismatch between the spec directory structure
+# and the piglit test categorization, for compatibility.
+for name in profile.test_list.keys():
+	orig_name = name
+	for x in ['arb', 'ext', 'oes']:
+		name = name.replace('spec/' + x, 'spec/' + x.upper())
+	if name != orig_name:
+		profile.test_list[name] = profile.test_list.pop(orig_name)

More information about the Piglit mailing list