diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2015-10-20 17:02:41 +0200 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2015-10-20 17:08:03 +0200 |
commit | b54a55c4d963a6f80c24803481458b866138e697 (patch) | |
tree | 923979359bbb08e8b639467fb5613e33476681be | |
parent | 62b213816e46d66125904be73bad2c3ebca09c3b (diff) |
Change duration to integer seconds in tempest results
JIRA: FUNCTEST-37
Change-Id: I4de4f8564598bbb8e47ff5e8062c696cf06ac55e
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
-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 8a417ccfc..8ad62d15e 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") |