[Piglit] [Bug 99649] New: When testlist contains non-existing (removed) test, piglit excepts out

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Feb 2 15:00:04 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=99649

            Bug ID: 99649
           Summary: When testlist contains non-existing (removed) test,
                    piglit excepts out
           Product: piglit
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: minor
          Priority: medium
         Component: infrastructure
          Assignee: baker.dylan.c at gmail.com
          Reporter: tomi.p.sarvela at intel.com
        QA Contact: piglit at lists.freedesktop.org

This trivial patch turns exception into warning if testlist contains
non-existing tests. Issue happens easily if testlist is maintained outside
framework and subtests (or even tests) are removed.

Patch sent to mailing list, but is waiting for moderation.

Best regards,

Tomi



diff --git a/framework/profile.py b/framework/profile.py
index 94efd0a..80f1cd3 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -39,6 +39,7 @@ import multiprocessing
 import multiprocessing.dummy
 import os
 import re
+import warnings

 import six

@@ -314,7 +315,8 @@ class TestProfile(object):
         if self.forced_test_list:
             opts = collections.OrderedDict()
             for n in self.forced_test_list:
-                opts[n] = self.test_list[n]
+                try: opts[n] = self.test_list[n]
+                except KeyError: warnings.warn("Test {} missing".format(n),
RuntimeWarning)
         else:
             opts = self.test_list  # pylint: disable=redefined-variable-type

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20170202/76891a2d/attachment.html>


More information about the Piglit mailing list