Lines Matching full:lines

33 	log : List[str] - log of KTAP lines that correspond to the test
153 A class to represent the lines of kernel output.
162 def __init__(self, lines: Iterator[Tuple[int, str]]):
164 self._lines = lines
197 """Returns True if stream has more lines."""
203 """Empties all lines stored in LineStream object into
222 """Extracts KTAP lines from the kernel output."""
231 # start extracting KTAP lines and set prefix
238 # start extracting KTAP lines and set prefix
244 # stop extracting KTAP lines
253 return LineStream(lines=isolate_ktap_output(kernel_output))
277 def parse_ktap_header(lines: LineStream, test: Test) -> bool:
287 lines - LineStream of KTAP output to parse
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:
317 lines - LineStream of KTAP output to parse
323 match = TEST_HEADER.match(lines.peek())
326 test.log.append(lines.pop())
332 def parse_test_plan(lines: LineStream, test: Test) -> bool:
343 lines - LineStream of KTAP output to parse
349 match = TEST_PLAN.match(lines.peek())
353 test.log.append(lines.pop())
362 def peek_test_name_match(lines: LineStream, test: Test) -> bool:
373 lines - LineStream of KTAP output to parse
380 line = lines.peek()
387 def parse_test_result(lines: LineStream, test: Test,
403 lines - LineStream of KTAP output to parse
410 line = lines.peek()
417 test.log.append(lines.pop())
440 def parse_diagnostic(lines: LineStream) -> List[str]:
442 Parse lines that do not match the format of a test result line or
451 lines - LineStream of KTAP output to parse
454 Log of diagnostic lines
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:
646 lines - LineStream of KTAP output to parse
648 log - list of strings containing any preceding diagnostic lines
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)
682 # or no more lines in stream.
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)
733 Using kernel output, extract KTAP lines, parse the lines for test
737 kernel_output - Iterable object contains lines of kernel output
743 lines = extract_tap_lines(kernel_output)
745 if not lines:
750 test = parse_test(lines, 0, [])