From 95ea8f3633f58cd5433e36c10074df5fe19a125a Mon Sep 17 00:00:00 2001 From: duerpei Date: Sat, 22 Oct 2022 17:17:15 +0800 Subject: agl-test-framework: enable ptest of 'busybox' Enable the test suite of 'busybox' from ptest Bug-AGL: SPEC-4345 Signed-off-by: duerpei Change-Id: I960f013d47f893f65766628da443ad6dce6f1009 --- tests/busybox/parser.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/busybox/parser.py (limited to 'tests/busybox/parser.py') diff --git a/tests/busybox/parser.py b/tests/busybox/parser.py new file mode 100644 index 0000000..e21814f --- /dev/null +++ b/tests/busybox/parser.py @@ -0,0 +1,20 @@ +import re + +def log_parse(log_file): + reObj = re.compile('^(PASS|FAIL|SKIP): (.+)', re.MULTILINE) + case_list = dict() + test_log = open(log_file, 'r') + + line = test_log.readline() + while line: + matchs = reObj.search(line) + + if matchs: + groups = list(matchs.groups()) + case_list[groups[1]] = [groups[1], groups[0], ""] + + line = test_log.readline() + + test_log.close() + + return case_list -- cgit