framework/summary.py: Adds new summary class and two support classes

Graphics / Mesa 3D Graphics Library / Piglit - Dylan Baker [gmail.com] - 31 May 2013 16:11 UTC

This new summary class (currently NewSummary), is a complete redesign of the summary generation system. Much of the code in summary was not commented, and also not clear as to what it was doing, making it very difficult to maintain and even more difficult to improve. The other problem with the code was architecturally it was clobbered together, doing some of the work in the summary.py file, and some of the work in the piglit-summary-html.py file.

The new summary class does all of it's work in the summary.py file, and from an API point of view, in one class. The summary class uses it's constructor to build lists of passes, failures, skips, problems, etc. and then uses methods to generate output. The reference implementation of that kind of method is for generating HTML, but in theory it could be used to generate anything: XML, csv lists, printed lists ala piglit-summary, etc.

Also updates the .gitignore file to ignore some generated content created by this class.

V3: - Corrects some spelling mistakes and some comments that had old method/variable names- renames several methods/functions- moves sanitizePath to a toplevel function- changes sanitizePath to use lambda per ken- Moves buildDictionary to a helper function instead of private method
V4: - Allows new summary generation to work with broken json.

90def85 framework/summary.py: Adds new summary class and two support classes
.gitignore | 2 +
framework/core.py | 1 +
framework/summary.py | 520 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 523 insertions(+)

Upstream: cgit.freedesktop.org


  • Share