[Piglit] [PATCH] framework: Try to fix the exclusions of llvmpipe test list.

Jose Fonseca jfonseca at vmware.com
Fri Mar 6 04:14:42 PST 2015


  del profile.test_list[key]

statement was silently failing because the TestDict's key lowering magic
was not happening for deleted items.

Unfortunately this still is not enough to fix the glean exclusions:
somehow all glean test names are being munged with extra whitespace.
For example:

  $ ./piglit-print-commands.py tests/llvmpipe.py | grep '^glean/p'
  warning: test glean/pointAtten does not exist
  warning: test glean/texCombine does not exist
  glean/p o i n t a t t e n ::: bin/glean -o -v -v -v -t +pointAtten --quick

But couldn't find out where this happens.
 framework/profile.py | 4 ++++
 tests/llvmpipe.py    | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/framework/profile.py b/framework/profile.py
index e8e8ba1..409b87e 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -80,6 +80,10 @@ class TestDict(dict):  # pylint: disable=too-few-public-methods
         """Lower the value before returning."""
         return super(TestDict, self).__getitem__(key.lower())
+    def __delitem__(self, key):
+        """Lower the value before returning."""
+        return super(TestDict, self).__delitem__(key.lower())
 class TestProfile(object):
     """ Class that holds a list of tests for execution
diff --git a/tests/llvmpipe.py b/tests/llvmpipe.py
index 64c651d..d3c9e6d 100644
--- a/tests/llvmpipe.py
+++ b/tests/llvmpipe.py
@@ -1,6 +1,7 @@
 # -*- coding: utf-8 -*-
 import platform
+import sys
 from framework.grouptools import join
 from tests.gpu import profile
@@ -12,7 +13,7 @@ def remove(key):
         del profile.test_list[key]
     except KeyError:
-        pass
+        sys.stderr.write('warning: test %s does not exist\n' % key)
 # These take too long or too much memory

More information about the Piglit mailing list