summaryrefslogtreecommitdiffstats
path: root/testcases/VIM
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2015-10-26 08:14:14 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-10-26 08:14:14 +0000
commit797f4543703a60ddca1ffabcda359b5ac33249de (patch)
tree1c3cc1624c2184c08fe754c285e73fe25af09831 /testcases/VIM
parentb3e241e1ee0e794ec732eddc5eaeb1f59dc1a999 (diff)
parentb54a55c4d963a6f80c24803481458b866138e697 (diff)
Merge "Change duration to integer seconds in tempest results"
Diffstat (limited to 'testcases/VIM')
-rw-r--r--testcases/VIM/OpenStack/CI/libraries/run_tempest.py7
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")