[Fuego] [PATCH 7/9] glibc: add support that we can split the output for each testcase

Liu Wenlong liuwl.fnst at cn.fujitsu.com
Wed Jan 31 07:50:12 UTC 2018


We can use those separated logs as the log link, which can help users
to check the log of those failures easily.

Signed-off-by: Liu Wenlong <liuwl.fnst at cn.fujitsu.com>
---
 engine/tests/Functional.glibc/parser.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/engine/tests/Functional.glibc/parser.py b/engine/tests/Functional.glibc/parser.py
index 9e32eb3..f8a2bf4 100755
--- a/engine/tests/Functional.glibc/parser.py
+++ b/engine/tests/Functional.glibc/parser.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # See common.py for description of command-line arguments
 
-import os, sys
+import os, sys, collections
 
 sys.path.insert(0, os.environ['FUEGO_CORE'] + '/engine/scripts/parser')
 import common as plib
@@ -10,9 +10,13 @@ measurements = {}
 
 regex_string = '^TEST-(\d+) (.*)$'
 matches = plib.parse_log(regex_string)
+measurements = collections.OrderedDict()
 
 if matches:
     for m in matches:
         measurements['default.test' + m[0]] = 'PASS' if m[1] == 'OK' else 'FAIL'
 
+# split the output for each testcase
+plib.split_output_per_testcase(regex_string, measurements)
+
 sys.exit(plib.process(measurements))
-- 
2.7.4





More information about the Fuego mailing list