Lines Matching +full:sub +full:- +full:blocks
1 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
5 # Generate an HTML-formatted log file containing multiple streams of data,
6 # each represented in a well-delineated/-structured fashion.
17 """A file-like object used to write a single logical stream of data into
27 chained_file: The file-like object to which all stream data should be
39 """Dummy function so that this class is "file-like".
56 stream, or was implicitly generated. A valid use-case is to
84 """A utility object used to execute sub-processes and log their output to
93 name: The name of this log stream or sub-process.
94 chained_file: The file-like object to which all stream data should
112 """Run a command as a sub-process, and log the results.
205 """Generates an HTML-formatted log file containing multiple streams of
206 data, each represented in a well-delineated/-structured fashion."""
220 self.blocks = []
241 btns = "<span class=\\\"block-expand hidden\\\">[+] </span>" +
242 "<span class=\\\"block-contract\\\">[-] </span>";
243 $(".block-header").prepend(btns);
245 // Pre-contract all blocks which passed, leaving only problem cases
247 // Only top-level blocks (sections) should have any status
248 passed_bcs = $(".block-content:has(.status-pass)");
249 // Some blocks might have multiple status entries (e.g. the status
250 // report), so take care not to hide blocks with partial success.
251 passed_bcs = passed_bcs.not(":has(.status-fail)");
252 passed_bcs = passed_bcs.not(":has(.status-xfail)");
253 passed_bcs = passed_bcs.not(":has(.status-xpass)");
254 passed_bcs = passed_bcs.not(":has(.status-skipped)");
255 passed_bcs = passed_bcs.not(":has(.status-warning)");
256 // Hide the passed blocks
258 // Flip the expand/contract button hiding for those blocks.
259 bhs = passed_bcs.parent().children(".block-header")
260 bhs.children(".block-expand").removeClass("hidden");
261 bhs.children(".block-contract").addClass("hidden");
265 $(".block-header").on("click", function (e) {
267 var content = header.next(".block-content");
271 header.children(".block-expand").first().removeClass("hidden");
272 header.children(".block-contract").first().addClass("hidden");
274 header.children(".block-contract").first().removeClass("hidden");
275 header.children(".block-expand").first().addClass("hidden");
283 var header = block.children(".block-header");
284 var content = block.children(".block-content").first();
285 header.children(".block-contract").first().removeClass("hidden");
286 header.children(".block-expand").first().addClass("hidden");
324 This includes HTML-escaping certain characters, and translating
354 self.f.write('<div class="stream-trailer block-trailer">End stream: ' +
361 """Write a note or one-off message to the log file.
397 self.blocks.append(marker)
402 blk_path = '/'.join(self.blocks)
404 self.f.write('<div class="section-header block-header">Section: ' +
406 self.f.write('<div class="section-content block-content">\n')
424 if (not self.blocks) or (marker != self.blocks[-1]):
426 (marker, '/'.join(self.blocks)))
430 delta_section = timestamp_now - timestamp_section_start
432 "TIME: SINCE-SECTION: " + str(delta_section))
433 blk_path = '/'.join(self.blocks)
434 self.f.write('<div class="section-trailer block-trailer">' +
438 self.blocks.pop()
538 delta_prev = timestamp_now - self.timestamp_prev
539 delta_start = timestamp_now - self.timestamp_start
545 "TIME: SINCE-PREV: " + str(delta_prev))
547 "TIME: SINCE-START: " + str(delta_start))
560 self._note("status-pass", msg, anchor)
573 self._note("status-warning", msg, anchor)
586 self._note("status-skipped", msg, anchor)
599 self._note("status-xfail", msg, anchor)
612 self._note("status-xpass", msg, anchor)
625 self._note("status-fail", msg, anchor)
630 This creates a "file-like" object that can be written to in order to
638 chained_file: The file-like object to which all stream data should
642 A file-like object.
651 name: The name of this sub-process.
652 chained_file: The file-like object to which all stream data should
671 stream, or was implicitly generated. A valid use-case is to
683 self.f.write('<div class="stream-header block-header">Stream: ' +
685 self.f.write('<div class="stream-content block-content">\n')