From dad8cf12bf18acab0984f633547acade6eea70e4 Mon Sep 17 00:00:00 2001 Message-Id: From: Fabian Bieler Date: Fri, 19 Jan 2018 20:24:07 +0100 Subject: [PATCH] Framework/summary: Include crashing subtests in fixes and regressions. Content-Type: text/plain; charset=UTF-8 To: piglit@lists.freedesktop.org This includes the subtest named "unknown" in the list of fixes and regressions if it vanishes or pops up, respectively. This is a bit hackish to make sure crashing subtests get the attention they deserve. See also 938ec48e2575b78defd06d169f704ed8d4f11bce. --- framework/summary/common.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/framework/summary/common.py b/framework/summary/common.py index 5af692703..c988d12b2 100644 --- a/framework/summary/common.py +++ b/framework/summary/common.py @@ -138,15 +138,35 @@ class Names(object): @lazy_property def regressions(self): + # Special handler for subtests named 'unknown': + # If a subtest regresses to crashing it's turns from pass to notrun. + # A virtual subtest named 'unknown' turns from notrun to crash. + # Include the later as a regression. + def handler(names, name, prev, cur): + if not _result_in(name, cur) or _result_in(name, prev): + return + if name.rpartition('@')[2] == 'unknown': + names.add(name) # By ensureing tha min(x, y) is >= so.PASS we eleminate NOTRUN and SKIP # from these pages - return self.__diff(lambda x, y: x < y and min(x, y) >= so.PASS) + return self.__diff(lambda x, y: x < y and min(x, y) >= so.PASS, + handler) @lazy_property def fixes(self): + # Special handler for subtests named 'unknown': + # If a subtest is fixed from crashing it's turns from notrun to pass. + # A virtual subtest named 'unknown' turns from crash to notrun. + # Include the later as a fix. + def handler(names, name, prev, cur): + if not _result_in(name, prev) or _result_in(name, cur): + return + if name.rpartition('@')[2] == 'unknown': + names.add(name) # By ensureing tha min(x, y) is >= so.PASS we eleminate NOTRUN and SKIP # from these pages - return self.__diff(lambda x, y: x > y and min(x, y) >= so.PASS) + return self.__diff(lambda x, y: x > y and min(x, y) >= so.PASS, + handler) @lazy_property def enabled(self): -- 2.15.1