aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorboucherv <valentin.boucher@orange.com>2016-08-11 09:06:09 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-11 09:06:09 +0000
commitfe1cdb02640ddf9baae6d09a949a4648264dd482 (patch)
tree8b8c14c250a929cebb73f20ff6884fc714623296 /utils
parente648bdc9f4f52208a44936fd8732afbe256a20c2 (diff)
parent7eefbe8f7ec52d727e8e504e4ddd4ddb57cf569e (diff)
Merge "Create config_functest patch to update the conf with scenario"
Diffstat (limited to 'utils')
-rw-r--r--utils/functest_utils.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/utils/functest_utils.py b/utils/functest_utils.py
index cb2333d4..d020ebac 100644
--- a/utils/functest_utils.py
+++ b/utils/functest_utils.py
@@ -212,10 +212,10 @@ def push_results_to_db(project, case_name, logger,
logger.debug(r)
return True
except Exception, e:
- print ("Error [push_results_to_db('%s', '%s', '%s', " +
- "'%s', '%s', '%s', '%s', '%s', '%s')]:" %
- (url, project, case_name, pod_name, version,
- scenario, criteria, build_tag, details)), e
+ print("Error [push_results_to_db('%s', '%s', '%s', " +
+ "'%s', '%s', '%s', '%s', '%s', '%s')]:" %
+ (url, project, case_name, pod_name, version,
+ scenario, criteria, build_tag, details)), e
return False
@@ -372,6 +372,19 @@ def check_success_rate(case_name, success_rate):
return status
+def merge_dicts(dict1, dict2):
+ for k in set(dict1.keys()).union(dict2.keys()):
+ if k in dict1 and k in dict2:
+ if isinstance(dict1[k], dict) and isinstance(dict2[k], dict):
+ yield (k, dict(merge_dicts(dict1[k], dict2[k])))
+ else:
+ yield (k, dict2[k])
+ elif k in dict1:
+ yield (k, dict1[k])
+ else:
+ yield (k, dict2[k])
+
+
def check_test_result(test_name, ret, start_time, stop_time):
def get_criteria_value():
return get_criteria_by_test(test_name).split('==')[1].strip()