diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2016-08-15 21:25:49 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-08-15 21:25:49 +0000 |
commit | 2f1322dad6057d1bbe64e4980922709bdb54336d (patch) | |
tree | 23ef36ede59b92460aeed1915bd9c215bf1c8d2c /testcases/features | |
parent | 1e937a18d5281c65b40f74b6cb40c198dae5544e (diff) | |
parent | 1a54e35fdde9f328ced7ea788f2f6daa94a9ce31 (diff) |
Merge "copper push to DB fix"
Diffstat (limited to 'testcases/features')
-rwxr-xr-x | testcases/features/copper.py | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/testcases/features/copper.py b/testcases/features/copper.py index 9efcbd7f4..78c0fb4d2 100755 --- a/testcases/features/copper.py +++ b/testcases/features/copper.py @@ -60,23 +60,29 @@ def main(): version = functest_utils.get_version(logger)
build_tag = functest_utils.get_build_tag(logger)
- logger.info("Pushing COPPER results: TEST_DB_URL=%(db)s pod_name=%(pod)s "
- "version=%(v)s scenario=%(s)s criteria=%(c)s details=%(d)s" % {
- 'db': TEST_DB_URL,
- 'pod': pod_name,
- 'v': version,
- 's': scenario,
- 'c': details['status'],
- 'b': build_tag,
- 'd': details,
- })
- functest_utils.push_results_to_db("COPPER",
- "COPPER-notification",
- logger,
- start_time,
- stop_time,
- details['status'],
- details)
+ try:
+ logger.info("Pushing COPPER results: TEST_DB_URL=%(db)s "
+ "pod_name=%(pod)s version=%(v)s scenario=%(s)s "
+ "criteria=%(c)s details=%(d)s" % {
+ 'db': TEST_DB_URL,
+ 'pod': pod_name,
+ 'v': version,
+ 's': scenario,
+ 'c': details['status'],
+ 'b': build_tag,
+ 'd': details,
+ })
+ functest_utils.push_results_to_db("copper",
+ "copper-notification",
+ logger,
+ start_time,
+ stop_time,
+ details['status'],
+ details)
+ except:
+ logger.error("Error pushing results into Database '%s'"
+ % sys.exc_info()[0])
+
if ret_val != 0:
sys.exit(-1)
|