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:
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'])