Lines Matching refs:lines

34 	log : List[str] - log of KTAP lines that correspond to the test
148 A class to represent the lines of kernel output.
157 def __init__(self, lines: Iterator[Tuple[int, str]]):
159 self._lines = lines
192 """Returns True if stream has more lines."""
198 """Empties all lines stored in LineStream object into
218 """Extracts KTAP lines from the kernel output."""
227 # start extracting KTAP lines and set prefix
234 # start extracting KTAP lines and set prefix
240 # stop extracting KTAP lines
248 return LineStream(lines=isolate_ktap_output(kernel_output))
272 def parse_ktap_header(lines: LineStream, test: Test) -> bool:
282 lines - LineStream of KTAP output to parse
288 ktap_match = KTAP_START.match(lines.peek())
289 tap_match = TAP_START.match(lines.peek())
298 lines.pop()
303 def parse_test_header(lines: LineStream, test: Test) -> bool:
312 lines - LineStream of KTAP output to parse
318 match = TEST_HEADER.match(lines.peek())
322 lines.pop()
327 def parse_test_plan(lines: LineStream, test: Test) -> bool:
338 lines - LineStream of KTAP output to parse
344 match = TEST_PLAN.match(lines.peek())
350 lines.pop()
357 def peek_test_name_match(lines: LineStream, test: Test) -> bool:
368 lines - LineStream of KTAP output to parse
375 line = lines.peek()
382 def parse_test_result(lines: LineStream, test: Test,
398 lines - LineStream of KTAP output to parse
405 line = lines.peek()
412 lines.pop()
435 def parse_diagnostic(lines: LineStream) -> List[str]:
437 Parse lines that do not match the format of a test result line or
447 lines - LineStream of KTAP output to parse
450 Log of diagnostic lines
454 while lines and not any(re.match(lines.peek())
456 log.append(lines.pop())
657 def parse_test(lines: LineStream, expected_num: int, log: List[str], is_subtest: bool) -> Test:
708 lines - LineStream of KTAP output to parse
710 log - list of strings containing any preceding diagnostic lines
721 err_log = parse_diagnostic(lines)
728 ktap_line = parse_ktap_header(lines, test)
729 test.log.extend(parse_diagnostic(lines))
730 parse_test_plan(lines, test)
735 ktap_line = parse_ktap_header(lines, test)
736 subtest_line = parse_test_header(lines, test)
741 test.log.extend(parse_diagnostic(lines))
742 parse_test_plan(lines, test)
752 # or no more lines in stream.
753 sub_log = parse_diagnostic(lines)
755 if not lines or (peek_test_name_match(lines, test) and
770 sub_test = parse_test(lines, test_num, sub_log, True)
776 test.log.extend(parse_diagnostic(lines))
777 if test.name != "" and not peek_test_name_match(lines, test):
780 parse_test_result(lines, test, expected_num)
803 Using kernel output, extract KTAP lines, parse the lines for test
807 kernel_output - Iterable object contains lines of kernel output
813 lines = extract_tap_lines(kernel_output)
815 if not lines:
820 test = parse_test(lines, 0, [], False)