aboutsummaryrefslogtreecommitdiffstats
path: root/utils/functest_utils.py
diff options
context:
space:
mode:
authorboucherv <valentin.boucher@orange.com>2016-08-10 18:59:41 +0200
committerboucherv <valentin.boucher@orange.com>2016-08-10 19:06:19 +0200
commit7eefbe8f7ec52d727e8e504e4ddd4ddb57cf569e (patch)
tree5b1b61bbe68c03a74397dbdbf9b36422aa90d0e7 /utils/functest_utils.py
parent9f923a7996f47b1187a759e28ad0728916d56fc9 (diff)
Create config_functest patch to update the conf with scenario
Adding support of LXD scenario JIRA: FUNCTEST-268 Change-Id: I5891ff9de674d99d32d8db747be501ee8a2e6609 Signed-off-by: boucherv <valentin.boucher@orange.com>
Diffstat (limited to 'utils/functest_utils.py')
-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()