From f16d011db75b08ceae241e7370599146691340ab Mon Sep 17 00:00:00 2001 From: "Feceoru, Gabriel" Date: Tue, 3 Nov 2015 17:50:41 +0200 Subject: framework: Add support for feature readiness. This adds a new "summary feature" command to piglit which creates a HTML table with the feature x DUT status (useful for multiple features, multiple DUTs). Another use case is the feature status for subsequent test results (depending on the meaning of that test result - DUT or build) A feature readiness is defined by the piglit regexp which selects the tests relevant for that feature and the acceptance percentage threshold (pass rate). It requires an input json file containing the list of features, in the following format (this is just an example): { "glsl" : { "include_tests" : "glsl", "exclude_tests" : "", "target_rate" : 90 }, "arb" : { "include_tests" : "arb_gpu", "exclude_tests" : "", "target_rate" : 10 } } v3: Changed json rate to int instead of string Applied other review comments v2: Apply review comments (Dylan, Thomas) Fixed 2nd round of review comments Signed-off-by: Gabriel Feceoru Reviewed-by: Dylan Baker --- templates/feature.mako | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 templates/feature.mako (limited to 'templates') diff --git a/templates/feature.mako b/templates/feature.mako new file mode 100644 index 000000000..ac9bc8677 --- /dev/null +++ b/templates/feature.mako @@ -0,0 +1,73 @@ +<%! + import posixpath # this must be posixpath, since we want /'s not \'s + import re + + + def feat_result(result): + """Percentage result string""" + return '{}/{}'.format(result[0], result[1]) + + + def escape_filename(key): + """Avoid reserved characters in filenames.""" + return re.sub(r'[<>:"|?*#]', '_', key) + + + def escape_pathname(key): + """ Remove / and \\ from names """ + return re.sub(r'[/\\]', '_', key) + + + def normalize_href(href): + """Force backward slashes in URLs.""" + return href.replace('\\', '/') +%> + + + + + + + Result summary + + + +

Feature readiness

+ + + ## Name Column + + + ## Status columns + ## Create an additional column for each summary + % for _ in xrange(len(results.results)): + + % endfor + + + + % endfor + + % for feature in results.features: + + ## Add the left most column, the feature name + + ## add the feature totals + % for res in results.results: + + % endfor + + % endfor +
+ % for res in results.results: + ${res.name}
\ + (info)
+
+ ${feature} +
+
+ ${feat_result(results.feat_fractions[res.name][feature])} +
+ + -- cgit v1.2.3