Lines Matching refs:lines
162 def __init__(self, lines: Iterator[Tuple[int, str]]):
164 self._lines = lines
253 return LineStream(lines=isolate_ktap_output(kernel_output))
277 def parse_ktap_header(lines: LineStream, test: Test) -> bool:
293 ktap_match = KTAP_START.match(lines.peek())
294 tap_match = TAP_START.match(lines.peek())
303 test.log.append(lines.pop())
308 def parse_test_header(lines: LineStream, test: Test) -> bool:
323 match = TEST_HEADER.match(lines.peek())
326 test.log.append(lines.pop())
332 def parse_test_plan(lines: LineStream, test: Test) -> bool:
349 match = TEST_PLAN.match(lines.peek())
353 test.log.append(lines.pop())
362 def peek_test_name_match(lines: LineStream, test: Test) -> bool:
380 line = lines.peek()
387 def parse_test_result(lines: LineStream, test: Test,
410 line = lines.peek()
417 test.log.append(lines.pop())
440 def parse_diagnostic(lines: LineStream) -> List[str]:
457 while lines and not TEST_RESULT.match(lines.peek()) and not \
458 TEST_HEADER.match(lines.peek()):
459 log.append(lines.pop())
612 def parse_test(lines: LineStream, expected_num: int, log: List[str]) -> Test:
657 main = parse_ktap_header(lines, test)
662 parse_test_plan(lines, test)
668 parent_test = parse_test_header(lines, test)
672 parse_test_plan(lines, test)
683 sub_log = parse_diagnostic(lines)
685 if not lines or (peek_test_name_match(lines, test) and
700 sub_test = parse_test(lines, test_num, sub_log)
706 test.log.extend(parse_diagnostic(lines))
707 if (parent_test and peek_test_name_match(lines, test)) or \
709 parse_test_result(lines, test, expected_num)
743 lines = extract_tap_lines(kernel_output)
745 if not lines:
750 test = parse_test(lines, 0, [])