MCPcopy
hub / github.com/NVIDIA/TensorRT-LLM / xml_to_html

Function xml_to_html

jenkins/scripts/test_rerun.py:131–353  ·  view source on GitHub ↗
(xml_filename, html_filename, sort_by_name=False)

Source from the content-addressed store, hash-verified

129
130
131def xml_to_html(xml_filename, html_filename, sort_by_name=False):
132 # HTML template
133 html_template = """
134 <!DOCTYPE html>
135 <html>
136 <head>
137 <title>Rerun Test Results</title>
138 <style>
139 body {{ font-family: Arial, sans-serif; margin: 10px; }}
140 .suite-container {{
141 margin-bottom: 20px;
142 border: 1px solid #ddd;
143 border-radius: 4px;
144 }}
145 .suite-header {{
146 padding: 10px;
147 background: #f8f9fa;
148 border-bottom: 1px solid #ddd;
149 }}
150 .summary {{ margin-bottom: 10px; }}
151 .success {{ color: #1e8e3e; }}
152 .failure {{ color: #d93025; }}
153 .error {{ color: #d93025; }}
154 .skipped {{ color: #666666; }}
155 .testcase {{
156 border-left: 4px solid #ddd;
157 margin: 5px 0;
158 background: white;
159 }}
160 .testcase.success {{ border-left-color: #1e8e3e; }}
161 .testcase.failure {{ border-left-color: #d93025; }}
162 .testcase.error {{ border-left-color: #d93025; }}
163 .testcase.skipped {{ border-left-color: #666666; }}
164 .test-time {{
165 color: #666;
166 font-size: 12px;
167 margin-left: 10px;
168 float: right;
169 }}
170 .test-rerun-sig {{
171 font-size: 12px;
172 color: #666;
173 margin-left: 5px;
174 }}
175 .test-details {{
176 padding: 10px;
177 background: #f5f5f5;
178 border-radius: 3px;
179 }}
180 pre {{
181 margin: 0;
182 white-space: pre-wrap;
183 word-wrap: break-word;
184 background: #2b2b2b;
185 color: #cccccc;
186 padding: 10px;
187 counter-reset: line;
188 }}

Callers 2

generate_rerun_reportFunction · 0.85
test_rerun.pyFile · 0.85

Calls 4

escape_htmlFunction · 0.85
parseMethod · 0.45
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected