summaryrefslogtreecommitdiff
path: root/bin
diff options
authorPierre Equoy <pierre.equoy@canonical.com>2016-03-03 16:02:48 +0800
committerPierre Equoy <pierre.equoy@canonical.com>2016-03-03 16:02:48 +0800
commit6716ddee365184bca79a9914eb0a80652c3d9c3c (patch)
tree404285dfec5384e83bcae1bb588929e11eb646d3 /bin
parent431dbf00996d6b8462888be8d84c343bdfceed64 (diff)
providers:checkbox: Fix summary parsing of FWTS tests
fwts_test launches fwts-related tests and parse the output so that plainbox can tell if there were High or Critical failures. Usually, fwts returns a one line such as "PASSED" or "FAILED_MEDIUM", but in some cases, it runs several tests in a row and therefore returns several lines. fwts_test retrieves those as a one line (e.g. "PASSED\nFAILED_MEDIUM\nSKIPPED…") so we modified the way it parses results in order to provide its output.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fwts_test12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/fwts_test b/bin/fwts_test
index 31b0545d..ef03bcaf 100755
--- a/bin/fwts_test
+++ b/bin/fwts_test
@@ -410,17 +410,17 @@ def main():
# parse the summaries
for test in results.keys():
- if results[test] == 'FAILED_CRITICAL':
+ if 'FAILED_CRITICAL' in results[test]:
critical_fails.append(test)
- elif results[test] == 'FAILED_HIGH':
+ if 'FAILED_HIGH' in results[test]:
high_fails.append(test)
- elif results[test] == 'FAILED_MEDIUM':
+ if 'FAILED_MEDIUM' in results[test]:
medium_fails.append(test)
- elif results[test] == 'FAILED_LOW':
+ if 'FAILED_LOW' in results[test]:
low_fails.append(test)
- elif results[test] == 'PASSED':
+ if 'PASSED' in results[test]:
passed.append(test)
- elif results[test] == 'ABORTED':
+ if 'ABORTED' in results[test]:
aborted.append(test)
else:
continue