[Fuego] [PATCH 1/5] LTP: add rt parsing

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Tue Feb 6 08:06:48 UTC 2018


Previously I had added rt parsing for ltp_process.py but not
for the general parser.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
 engine/tests/Functional.LTP/parser.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/engine/tests/Functional.LTP/parser.py b/engine/tests/Functional.LTP/parser.py
index f9cc234..2dc44a8 100755
--- a/engine/tests/Functional.LTP/parser.py
+++ b/engine/tests/Functional.LTP/parser.py
@@ -204,6 +204,22 @@ for line in lines:
 # hope no posix tests have the same test_ids as regular tests
 test_results.update(posix_results)
 
+if os.path.exists('rt.log'):
+    rt_results = {}
+    with open('rt.log') as f:
+        rt_testcase_regex = "^--- Running testcase (.*)  ---$"
+        rt_results_regex = "^\s*Result:\s*(.*)$"
+        for line in f:
+            m = re.match(rt_testcase_regex, line.rstrip())
+            if m:
+                test_case = m.group(1)
+            m = re.match(rt_results_regex, line.rstrip())
+            if m:
+                test_result = m.group(1)
+                test_id = "rt." + test_case
+                rt_results[test_id] = test_result
+    test_results.update(rt_results)
+
 os.chdir(SAVEDIR)
 sys.exit(plib.process(test_results))
 
-- 
2.7.4




More information about the Fuego mailing list