[Piglit] [PATCH 2/2] core: generate a summary of fixes

Marek Olšák maraeo at gmail.com
Mon Apr 4 15:36:50 PDT 2011


Same as regressions if you reverse the order of columns.
---
 framework/summary.py   |    4 ++++
 piglit-summary-html.py |    6 +++++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/framework/summary.py b/framework/summary.py
index 133d6c5..c69fd2f 100644
--- a/framework/summary.py
+++ b/framework/summary.py
@@ -102,6 +102,8 @@ results is an array of TestResult instances, one per testrun
 		self.changes = len(statiSet) > 1
 		self.problems = len(statiSet - set(['pass', 'skip'])) > 0
 		self.regressions = self.isRegression(statiList)
+		statiList.reverse()
+		self.fixes = self.isRegression(statiList)
 
 	def allTests(self):
 		return [self]
@@ -124,6 +126,7 @@ results is an array of GroupResult instances, one per testrun
 		self.changes = False
 		self.problems = False
 		self.regressions = False
+		self.fixes = False
 		self.children = {}
 
 		# Perform some initial annotations
@@ -169,6 +172,7 @@ results is an array of GroupResult instances, one per testrun
 				self.changes = self.changes or self.children[name].changes
 				self.problems = self.problems or self.children[name].problems
 				self.regressions = self.regressions or self.children[name].regressions
+				self.fixes = self.fixes or self.children[name].fixes
 
 	def allTests(self):
 		"""\
diff --git a/piglit-summary-html.py b/piglit-summary-html.py
index 30a049e..4e94237 100755
--- a/piglit-summary-html.py
+++ b/piglit-summary-html.py
@@ -76,7 +76,8 @@ SummaryPages = {
 	'all': 'index.html',
 	'changes': 'changes.html',
 	'problems': 'problems.html',
-	'regressions': 'regressions.html'
+	'regressions': 'regressions.html',
+	'fixes': 'fixes.html'
 }
 
 def buildDetailValue(detail):
@@ -195,6 +196,8 @@ def buildGroupSummary(indent, groupsummary, showcurrent):
 		names = filter(lambda n: groupsummary.children[n].problems, names)
 	elif showcurrent == 'regressions':
 		names = filter(lambda n: groupsummary.children[n].regressions, names)
+	elif showcurrent == 'fixes':
+		names = filter(lambda n: groupsummary.children[n].fixes, names)
 
 	names.sort()
 	for n in names:
@@ -329,6 +332,7 @@ def main():
 	writeSummaryHtml(summary, summaryDir, 'problems')
 	writeSummaryHtml(summary, summaryDir, 'changes')
 	writeSummaryHtml(summary, summaryDir, 'regressions')
+	writeSummaryHtml(summary, summaryDir, 'fixes')
 
 
 if __name__ == "__main__":
-- 
1.7.1



More information about the Piglit mailing list