summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhongbo tian <hongbo.tianhongbo@huawei.com>2017-04-26 08:23:28 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-04-26 08:23:28 +0000
commit4ee4bfd19fd2d9e8328e9594c6eb3a00ec67878d (patch)
tree8b330471375477d391a83e475e8fc5297c44f1ab
parentd473f82ebfe5e18540702d6ef13cad19eae4f1a6 (diff)
parentf08a5d3b07e401213afb88f0100786fba6a624ff (diff)
Merge "Bugfix: All HA testcases are SSH timeout in CI jobs"
-rw-r--r--.gitignore3
-rw-r--r--dovetail/conf/yardstick_config.yml16
-rw-r--r--dovetail/container.py13
3 files changed, 20 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index c0bae6e3..a8b4a9fd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,4 +33,5 @@ unittest_results.log
*.sw?
docs_build/
docs_output/
-dovetail/results
+results/
+userconfig/
diff --git a/dovetail/conf/yardstick_config.yml b/dovetail/conf/yardstick_config.yml
index e9a674a9..ac128fb8 100644
--- a/dovetail/conf/yardstick_config.yml
+++ b/dovetail/conf/yardstick_config.yml
@@ -3,16 +3,20 @@ yardstick:
image_name: opnfv/yardstick
docker_tag: latest
opts: '-id --privileged=true'
+ config:
+ dir: '/home/opnfv/userconfig'
pre_condition:
- - 'cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh &&
- source tests/ci/clean_images.sh && cleanup'
- - 'cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh &&
- source tests/ci/load_images.sh'
+ - ''
+ # - 'cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh &&
+ # source tests/ci/clean_images.sh && cleanup'
+ # - 'cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh &&
+ # source tests/ci/load_images.sh'
cmds:
- 'mkdir -p /home/opnfv/yardstick/results/'
- - 'cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh &&
+ - "cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh &&
yardstick -d task start tests/opnfv/test_cases/{{validate_testcase}}.yaml
- --output-file /home/opnfv/yardstick/results/{{validate_testcase}}.out'
+ --output-file /home/opnfv/yardstick/results/{{validate_testcase}}.out
+ --task-args '{'file': '/home/opnfv/userconfig/pod.yaml'}'"
post_condition:
- ''
result:
diff --git a/dovetail/container.py b/dovetail/container.py
index 3b040ca9..8e032c75 100644
--- a/dovetail/container.py
+++ b/dovetail/container.py
@@ -126,11 +126,14 @@ class Container(object):
return None
# for refstack, support user self_defined configuration
- config_volume = ""
- if type.lower() == "functest":
- config_volume = \
- ' -v %s:%s ' % (dovetail_config['userconfig_dir'],
- dovetail_config["functest"]['config']['dir'])
+ # for yardstick, support pod.yaml configuration
+ pod_file = os.path.join(dovetail_config['userconfig_dir'], 'pod.yaml')
+ if type.lower() == "yardstick" and not os.path.exists(pod_file):
+ cls.logger.error("File %s doesn't exist.", pod_file)
+ return None
+ config_volume = \
+ ' -v %s:%s ' % (dovetail_config['userconfig_dir'],
+ dovetail_config["functest"]['config']['dir'])
result_volume = ' -v %s:%s ' % (dovetail_config['result_dir'],
dovetail_config[type]['result']['dir'])