diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2015-10-26 08:14:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-10-26 08:14:14 +0000 |
commit | 797f4543703a60ddca1ffabcda359b5ac33249de (patch) | |
tree | 1c3cc1624c2184c08fe754c285e73fe25af09831 /testcases | |
parent | b3e241e1ee0e794ec732eddc5eaeb1f59dc1a999 (diff) | |
parent | b54a55c4d963a6f80c24803481458b866138e697 (diff) |
Merge "Change duration to integer seconds in tempest results"
Diffstat (limited to 'testcases')
-rw-r--r-- | testcases/VIM/OpenStack/CI/libraries/run_tempest.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py index 8a417ccf..8ad62d15 100644 --- a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py @@ -120,9 +120,14 @@ def run_tempest(OPTION): num_failures = output[5] time_start = output[6] duration = output[7] + # Compute duration (lets assume it does not take more than 60 min) + dur_min=int(duration.split(':')[1]) + dur_sec_float=float(duration.split(':')[2]) + dur_sec_int=int(round(dur_sec_float,0)) + dur_sec_int = dur_sec_int + 60 * dur_min # Generate json results for DB - json_results = {"timestart": time_start, "duration": duration, + json_results = {"timestart": time_start, "duration": dur_sec_int, "tests": int(num_tests), "failures": int(num_failures)} logger.info("Results: "+str(json_results)) push_results_to_db(json_results, MODE, "opnfv-jump-2") |