Adds the actual templates used to by the new mako based summary code.

Signed-off-by: Dylan Baker <baker.dyla...@gmail.com>
---
 templates/index.mako       | 79 ++++++++++++++++++++++++++++++++++++++++++++++
 templates/test_index.mako  | 49 ++++++++++++++++++++++++++++
 templates/test_result.mako | 47 +++++++++++++++++++++++++++
 3 files changed, 175 insertions(+)
 create mode 100644 templates/index.mako
 create mode 100644 templates/test_index.mako
 create mode 100644 templates/test_result.mako

diff --git a/templates/index.mako b/templates/index.mako
new file mode 100644
index 0000000..acc597d
--- /dev/null
+++ b/templates/index.mako
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+       <head>
+               <meta http-equiv="Content-Type" content="text/html; 
charset=UTF-8" />
+               <title>Result summary</title>
+               <link rel="stylesheet" href="index.css" type="text/css" />
+       </head>
+       <body>
+               <h1>Result summary</h1>
+               <p>Currently showing: all</p>
+               <p>Show:
+                       % for i in ['index', 'changes', 'fixes', 'problems', 
'regressions', 'skipped']:
+                               % if i == page:
+          ${page}
+        % elif i == 'index':
+          % if page == 'all':
+          all
+          % else:
+          <a href="index.html">all</a>
+          % endif
+                               % else:
+                                       <a href="${i}.html">${i}</a>
+                               % endif
+                               % if i != "skipped":
+                                       |
+                               % endif
+                       % endfor
+               </p>
+               <table>
+                       <colgroup>
+                               ## Name Column
+                               <col />
+
+                               ## Status columns
+                               ## Create an additional column for each summary
+                               % for _ in xrange(colnum):
+                               <col />
+                               % endfor
+                       </colgroup>
+                       % for line in results:
+                               % if line['type'] == "newRow":
+                               <tr>
+                               % elif line['type'] == "endRow":
+                               </tr>
+                               % elif line['type'] == "groupRow":
+                                       <td>
+                                               <div class="${line['class']}" 
style="margin-left: ${line['indent']}em">
+                                                       <b>${line['text']}</b>
+                                               </div>
+                                       </td>
+                               % elif line['type'] == "testRow":
+                                       <td>
+                                               <div class="${line['class']}" 
style="margin-left: ${line['indent']}em">
+                                                       ${line['text']}
+                                               </div>
+                                       </td>
+                               % elif line['type'] == "groupResult":
+                                       <td class="${line['class']}">
+                                               <b>${line['text']}</b>
+                                       </td>
+                               % elif line['type'] == "testResult":
+                                       <td class="${line['class']}">
+                                               <a href="${line['href']}">
+                                                       ${line['text']}
+                                               </a>
+                                       </td>
+        % elif line['type'] == "subtestResult":
+                                       <td class="${line['class']}">
+            ${line['text']}
+                                       </td>
+                               % elif line['type'] == "other":
+                                       ${line['text']}
+                               % endif
+                       % endfor
+               </table>
+       </body>
+</html>
diff --git a/templates/test_index.mako b/templates/test_index.mako
new file mode 100644
index 0000000..edfab91
--- /dev/null
+++ b/templates/test_index.mako
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//END"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+       <head>
+               <meta http-equiv="Content-Type" content="text/html; 
charset=UTF-8" />
+               <title>${name} - System info</title>
+               <link rel="stylesheet" href="../result.css" type="text/css" />
+       </head>
+       <body>
+               <h1>System info for ${name}</h1>
+               <p>
+                       <a href="../index.html">Back to summary</a>
+               </p>
+               <table>
+                       <tr>
+                               <th>Detail</th>
+                               <th>Value</th>
+                       </tr>
+                       <tr>
+                               <td>time_elapsed</td>
+                               <td>${time}</td>
+                       </tr>
+                       <tr>
+                               <td>name</td>
+                               <td>${name}</td>
+                       </tr>
+                       <tr>
+                               <td>options</td>
+                               <td>${options}</td>
+                       </tr>
+                       <tr>
+                               <td>lspci</td>
+                               <td>
+                                       <pre>${lspci}</pre>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td>glxinfo</td>
+                               <td>
+                                       <pre>${glxinfo}</pre>
+                               </td>
+                       </tr>
+               </table>
+               <p>
+                       <a href="../index.html">Back to summary</a>
+               </p>
+       </body>
+</html>
diff --git a/templates/test_result.mako b/templates/test_result.mako
new file mode 100644
index 0000000..1f944cb
--- /dev/null
+++ b/templates/test_result.mako
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//END"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+       <head>
+               <meta http-equiv="Content-Type" content="text/html; 
charset=UTF-8" />
+               <title>${testname} - Details</title>
+               <link rel="stylesheet" href="../result.css" type="text/css" />
+       </head>
+       <body>
+               <h1>Results for ${testname}</h1>
+               <h2>Overview</h2>
+               <div>
+                       <p><b>Status:</b> ${status}</p>
+                       <p><b>Result:</b> ${status}</p>
+               </div>
+               <p><a href="../index.html">Back to summary</a></p>
+               <h2>Details</h2>
+               <table>
+                       <tr>
+                               <th>Detail</th>
+                               <th>Value</th>
+                       </tr>
+                       <tr>
+                               <td>Returncode</td>
+                               <td>${returncode}</td>
+                       </tr>
+                       <tr>
+                               <td>Time</td>
+                               <td>${time}</b>
+                       </tr>
+                       <tr>
+                               <td>Info</td>
+                               <td>
+                                       <pre>${info}</pre>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td>Command</td>
+                               <td>
+                                       </pre>${command}</pre>
+                               </td>
+                       </tr>
+               </table>
+               <p><a href="../index.html">Back to summary</a></p>
+       </body>
+</html>
-- 
1.8.1.4

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to