-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathreport-base.j2.html
221 lines (169 loc) · 5.06 KB
/
report-base.j2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
{#
This is a Jinja2 template which can be extended to suit your reporting
needs
report.j2.html expands this; you can define a report.j2.html this in
.tcf:~/.tcf:/etc/tcf to override it. You can also override this file
in any of those locations.
See FIXME: location
TIPS:
- Note {%- and -%}, they are used to avoid adding vertcal whitespace;
see http://jinja.pocoo.org/docs/2.10/templates/#whitespace-control
Adding - basically eats out the emtpy vertical whitespace.
-#}
<!doctype html>
<html>
<head>
<!--
SPDX-License-Identifier: Apache-2.0
Copyright (c) 2024 Intel Corporation
-->
<title>
{% block TITLE %}
TCF: {{ tc_name_short }} @ {{ target_group_info }} **{{ result_past }}**
{% endblock %}
</title>
</head>
<style>
table {
/* border-collapse: collapse; */
}
th, td {
text-align: left; /* align text to the right */
padding: 8px;
}
tr:nth-child(even) { /* make a grey line every other row in a table */
background-color: #eeEEEE;
}
</style>
<body>
<!-- repeat this, since the title is not that visible -->
<h1>
<b>TCF:</b> {{ tc_name_short }} @ {{ target_group_info }} <b>{{result_past }}</b>
</h1>
{%- block TARGET_INFORMATION %}
<h2>Target information</h2>
{%- if targets %}
<table>
<thead>
<tr>
<th>Target name</th>
<th>Remote ID</th>
<th>Type</th>
</tr>
</thead>
<tbody>
{% for target_info in targets -%}
<tr>
<td>{{ target_info.want_name }}</td>
<td><a href = "{{ target_info.server_url }}/ttb-v2/ui/target/{{ target_info.id }}">{{ target_info.fullid }}</a></td>
<td>{{ target_info.type }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>(this testcase used no remote targets and ran locally)</p>
{% endif %}
{% endblock -%}
{# This is left empty to other templates to expand as needed #}
{%- block HEADER_PREFIX -%}
{%- endblock -%}
<h2>Execution Log</h2>
<ul>
<li>console output in lines tagged 'console output'</li>
<li>the target might have produced none; GDB might be needed at this point</li>
<li>information for all testcase build, deployment and execution phases
is included; filter by the first column</li>
</ul>
<pre>
{% for ident, tgname, message in log -%}
{{ "%-10s %-25s %s" | format(ident, tgname, message) }}
{% endfor %}
</pre>
<hr>
{% block TAG_INFO -%}
<table>
<thead>
<tr>
<th>Testcase tag</th>
<th>Value</th>
<th>Origin</th>
</tr>
</thead>
<tbody>
{% for tag, tag_info in tags.items() -%}
<tr>
<td>{{ tag }}</td>
<td>{{ tag_info.value }}</td>
<td>{{ tag_info.origin }}</td>
</tr>
</tbody>
{% endfor %}
</table>
{%- endblock %}
{% block REPRODUCTION_STEPS -%}
<h2>Reproduction steps</h2>
{%- if targets %}
{%- block TCF_CONFIGURATION %}
<p>
Make sure your TCF client can access the servers used in this run:
{% for server_url, ssl_ignore, server_aka, ca_path in tcfl_config_urls -%}
<pre>$ tcf servers-discover {{ server_url }}</pre>
{% endfor %}
</p>
{%- endblock %}
{%- endif %}
<p>Run again:</p>
<pre>$ tcf run -vvv{{ t_option }} {{ tc_name_toplevel }}</pre>
{% if targets -%}
<table>
<tr>
<td>Find more information about targets: <td/>
<td><pre>$ tcf list -vv TARGETNAME1 TARGETNAME2 ...</pre><td/>
</tr>
<tr>
<td>
Acquire them for exclusive use:
<p>(note the daemon will relinquish them after a time of inactivity)</p>
<td/>
<td><pre>$ tcf acquire TARGETNAME1 TARGETNAME2 ...</pre><td/>
</tr>
<tr>
<td>Start debugging<td/>
<td><pre>
$ tcf debug-start TARGETNAME
$ tcf debug-info TARGETNAME
</pre><td/>
</tr>
<tr>
<td>Power on/off/cycle<td/>
<td><pre>$ tcf power-on|off|cycle TARGETNAME1 TARGETNAME2 ...</pre><td/>
</tr>
<tr>
<td>Read the console<td/>
<td><pre>$ tcf console-read TARGETNAME</pre><td/>
</tr>
<tr>
<td>Release when done<td/>
<td><pre>$ tcf release TARGETNAME1 TARGETNAME2 ...</pre><td/>
</tr>
<tr>
<td><td/>
<td><pre></pre><td/>
</tr>
<tr>
<td><td/>
<td><pre></pre><td/>
</tr>
</table>
{% endif -%}
{% endblock -%}
<h2>Origin</h2>
<p>This report was generated by <a href = "http://intel.github.com/tcf/02-QUICKSTART.html">TCF</a>
while executing the testcase <i>{{thisfile}}</i>.
<p>This report can be configure by modifying the Jinja2 template
<i>tcfl.report_jinja2.templates['html']</i> in any of
TCF's <i>conf_*.py</i> configuration files.</p>.
</pre>
</body>
</html>