add new indexing test with dynamic indexing of integer vector
[piglit.git] / templates / feature.mako
blob9abd5bc3113881248827d60f2579a66dae2676c5
1 <%!
2   import posixpath  # this must be posixpath, since we want /'s not \'s
3   import re
5   from six.moves import range
8   def feat_result(result):
9       """Percentage result string"""
10       return '{}/{}'.format(result[0], result[1])
13   def escape_filename(key):
14       """Avoid reserved characters in filenames."""
15       return re.sub(r'[<>:"|?*#]', '_', key)
18   def escape_pathname(key):
19       """ Remove / and \\ from names """
20       return re.sub(r'[/\\]', '_', key)
23   def normalize_href(href):
24       """Force backward slashes in URLs."""
25       return href.replace('\\', '/')
28 <?xml version="1.0" encoding="UTF-8"?>
29 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
30  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
31 <html xmlns="http://www.w3.org/1999/xhtml">
32   <head>
33     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
34     <title>Result summary</title>
35     <link rel="stylesheet" href="index.css" type="text/css" />
36   </head>
37   <body>
38     <h1>Feature readiness</h1>
39     <table>
40       <colgroup>
41         ## Name Column
42         <col />
44         ## Status columns
45         ## Create an additional column for each summary
46         % for _ in range(len(results.results)):
47         <col />
48         % endfor
49       </colgroup>
50       <tr>
51         <th/>
52         % for res in results.results:
53           <th class="head"><b>${res.name}</b><br />\
54           (<a href="${normalize_href(posixpath.join(escape_pathname(res.name), 'index.html'))}">info</a>)</th>
55         % endfor
56       </tr>
57       % for feature in results.features:
58         <tr>
59         ## Add the left most column, the feature name
60         <td>
61           <div class="group">
62             <b>${feature}</b>
63           </div>
64         </td>
65         ## add the feature totals
66         % for res in results.results:
67           <td class="${results.feat_status[res.name][feature]}">
68             <b>${feat_result(results.feat_fractions[res.name][feature])}</b>
69           </td>
70         % endfor
71         </tr>
72       % endfor
73     </table>
74   </body>
75 </html>