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: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
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._______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit