summaryrefslogtreecommitdiffstats
path: root/dovetail/run.py
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-09-06 21:49:26 -0400
committerxudan <xudan16@huawei.com>2017-09-06 21:55:25 -0400
commit45b1f1841b35fd8771e2aa154b2f4a5af776bd46 (patch)
tree9ea32d47a6d1f93c73465d1b9a51de67f194bd75 /dovetail/run.py
parent1fb4ff1c309018d42645bfbb344d2be9dd4ac9cd (diff)
Add a patch to set ha SLA to be 30 seconds
1. According to ha test specification doc, the SLA of process recover time is 30 seconds. 2. However, the SLA in Yardstick test cases are all 20 seconds. 3. Add a patch to change the SLA in yardstick test cases. JIRA: DOVETAIL-496 Change-Id: Ib8f229fdfbb3289bf70d6ee900132b3db3a21b17 Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/run.py')
-rwxr-xr-xdovetail/run.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/dovetail/run.py b/dovetail/run.py
index 01111dd3..1133b864 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -203,7 +203,9 @@ def get_result_path():
result_path = os.path.join(dovetail_home, 'results')
dt_cfg.dovetail_config['result_dir'] = result_path
pre_config_path = os.path.join(dovetail_home, 'pre_config')
+ patch_set_path = os.path.join(dovetail_home, 'patch')
dt_cfg.dovetail_config['config_dir'] = pre_config_path
+ dt_cfg.dovetail_config['patch_dir'] = patch_set_path
return dovetail_home
@@ -217,6 +219,16 @@ def copy_userconfig_files(logger):
dt_utils.exec_cmd(cmd, logger, exit_on_error=False)
+def copy_patch_files(logger):
+ dovetail_home = os.path.dirname(os.path.abspath(__file__))
+ patch_path = os.path.join(dovetail_home, 'patch')
+ patch_set_path = dt_cfg.dovetail_config['patch_dir']
+ if not os.path.isdir(patch_set_path):
+ os.makedirs(patch_set_path)
+ cmd = 'sudo cp -r %s/* %s' % (patch_path, patch_set_path)
+ dt_utils.exec_cmd(cmd, logger, exit_on_error=False)
+
+
# env_init can source some env variable used in dovetail, such as
# when https+credential used, OS_CACERT
def env_init(logger):
@@ -244,6 +256,7 @@ def main(*args, **kwargs):
logger.info('Build tag: {}'.format(dt_cfg.dovetail_config['build_tag']))
env_init(logger)
copy_userconfig_files(logger)
+ copy_patch_files(logger)
dt_utils.check_docker_version(logger)
validate_input(kwargs, dt_cfg.dovetail_config['validate_input'], logger)
configs = filter_config(kwargs, logger)