On 03/12/2014 12:02 PM, Plamen Dimitrov wrote:
Very often the parser results originate from different level
status files where the upper level status fail already contains
the test results from the lower level one. It is possible that
the upper level status contains extra test results, therefore
it cannot simply be ignored and must be parsed as well. In
order to allow this, we need to parse the distinct test results
and avoid flooding the console report with redundant such.
---
client/tools/scan_results.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/client/tools/scan_results.py b/client/tools/scan_results.py
index c5f8e1f..cefb7fe 100755
--- a/client/tools/scan_results.py
+++ b/client/tools/scan_results.py
@@ -16,6 +16,7 @@ def parse_results(text):
result_list = []
start_time_list = []
info_list = []
+ test_names = []
lines = text.splitlines()
for line in lines:
@@ -40,8 +41,12 @@ def parse_results(text):
# Remove "kvm." prefix
if test_name.startswith("kvm."):
test_name = test_name[4:]
- result_list.append((test_name, test_status,
- int(end_time - start_time), info))
+ # Parse test results only once (iterated tests are expected
+ # to have an iteration number in their name)
+ if test_name not in test_names:
+ result_list.append((test_name, test_status,
+ int(end_time - start_time), info))
+ test_names.append(test_name)
Ah, cool, I like this. Looks good.
# Found a FAIL/ERROR/GOOD line -- get failure/success info
elif (len(parts) >= 6 and parts[3].startswith("timestamp") and
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel