summaryrefslogtreecommitdiffstats
path: root/dovetail/conf
diff options
context:
space:
mode:
authorLeo Wang <grakiss.wanglei@huawei.com>2016-11-29 04:21:40 -0500
committerLeo Wang <grakiss.wanglei@huawei.com>2016-12-13 02:40:02 -0500
commit1c0f19209637572d0bd50c1a3691bc18ee6fb9ee (patch)
treec8bda462d8ca8e830bb4843e46d48c1aa0a657fd /dovetail/conf
parent0a90987741fe2b0a2cc81c5b8ffef46a8111f250 (diff)
[dovetail tool] support shell scripts for testcase validation
JIRA: DOVETAIL-46 1. for now a testcase has two kinds of validation types(functest, yardstick), and it is not enough to check the complete funcionality 2. add new validation type(shell) for extra validation of the test case to make result more accurate and more convincing. Change-Id: I45dca6b8dbd888757da163189d261f6e4dba5034 Signed-off-by: Leo Wang <grakiss.wanglei@huawei.com>
Diffstat (limited to 'dovetail/conf')
-rw-r--r--dovetail/conf/dovetail_config.py6
-rw-r--r--dovetail/conf/dovetail_config.yml4
-rw-r--r--dovetail/conf/functest_config.yml13
-rw-r--r--dovetail/conf/yardstick_config.yml19
4 files changed, 18 insertions, 24 deletions
diff --git a/dovetail/conf/dovetail_config.py b/dovetail/conf/dovetail_config.py
index d812c5c9..6cf3f7af 100644
--- a/dovetail/conf/dovetail_config.py
+++ b/dovetail/conf/dovetail_config.py
@@ -54,12 +54,12 @@ class DovetailConfig:
cls.update_config_envs('yardstick', key, options[item])
@classmethod
- def update_config_envs(cls, script_type, key, value):
- envs = cls.dovetail_config[script_type]['envs']
+ def update_config_envs(cls, validate_type, key, value):
+ envs = cls.dovetail_config[validate_type]['envs']
old_value = re.findall(r'\s+%s=(.*?)(\s+|$)' % key, envs)
if old_value == []:
envs += ' -e ' + key + '=' + value
else:
envs = envs.replace(old_value[0][0], value)
- cls.dovetail_config[script_type]['envs'] = envs
+ cls.dovetail_config[validate_type]['envs'] = envs
return envs
diff --git a/dovetail/conf/dovetail_config.yml b/dovetail/conf/dovetail_config.yml
index be2d075d..5264f140 100644
--- a/dovetail/conf/dovetail_config.yml
+++ b/dovetail/conf/dovetail_config.yml
@@ -25,8 +25,8 @@ testarea_supported:
parameters:
- name: testcase
path: '("name",)'
- - name: script_testcase
- path: '("scripts", "testcase")'
+ - name: validate_testcase
+ path: '("validate", "testcase")'
include_config:
- functest_config.yml
diff --git a/dovetail/conf/functest_config.yml b/dovetail/conf/functest_config.yml
index d32fe87f..72cdb0dd 100644
--- a/dovetail/conf/functest_config.yml
+++ b/dovetail/conf/functest_config.yml
@@ -6,15 +6,12 @@ functest:
-e BUILD_TAG=dovetail -e CI_DEBUG=true -e DEPLOY_TYPE=baremetal'
opts: '-id --privileged=true'
pre_condition:
- cmds:
- - 'echo test for precondition'
- testcase:
- cmds:
- - 'functest env prepare'
- - 'functest testcase run {{script_testcase}}'
+ - 'echo test for precondition'
+ cmds:
+ - 'functest env prepare'
+ - 'functest testcase run {{validate_testcase}}'
post_condition:
- cmds:
- - ''
+ - ''
result:
dir: '/home/opnfv/functest/results'
store_type: 'file'
diff --git a/dovetail/conf/yardstick_config.yml b/dovetail/conf/yardstick_config.yml
index f7f05bcc..d13cf2c6 100644
--- a/dovetail/conf/yardstick_config.yml
+++ b/dovetail/conf/yardstick_config.yml
@@ -7,21 +7,18 @@ yardstick:
-e EXTERNAL_NETWORK=ext-net'
opts: '-id --privileged=true'
pre_condition:
- cmds:
- - 'source /home/opnfv/repos/yardstick/tests/ci/prepare_env.sh &&
+ - 'source /home/opnfv/repos/yardstick/tests/ci/prepare_env.sh &&
source /home/opnfv/repos/yardstick/tests/ci/clean_images.sh && cleanup'
- - 'source /home/opnfv/repos/yardstick/tests/ci/prepare_env.sh &&
+ - 'source /home/opnfv/repos/yardstick/tests/ci/prepare_env.sh &&
cd /home/opnfv/repos/yardstick && source tests/ci/load_images.sh'
- testcase:
- cmds:
- - 'mkdir -p /home/opnfv/yardstick/results/'
- - 'cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh &&
- yardstick task start tests/opnfv/test_cases/{{script_testcase}}.yaml
- --output-file /home/opnfv/yardstick/results/{{script_testcase}}.out &>
+ cmds:
+ - 'mkdir -p /home/opnfv/yardstick/results/'
+ - 'cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh &&
+ yardstick task start tests/opnfv/test_cases/{{validate_testcase}}.yaml
+ --output-file /home/opnfv/yardstick/results/{{validate_testcase}}.out &>
/home/opnfv/yardstick/results/yardstick.log'
post_condition:
- cmds:
- - ''
+ - ''
result:
dir: '/home/opnfv/yardstick/results'
store_type: 'file'