summaryrefslogtreecommitdiffstats
path: root/dovetail
diff options
context:
space:
mode:
authorhongbo tian <hongbo.tianhongbo@huawei.com>2016-12-19 03:01:05 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-19 03:01:05 +0000
commitdc5216ef3b7833f5f7dfe81919b96f4e8f04280c (patch)
tree1f32b14284f2d916689835430534af60d4608491 /dovetail
parent10f6a7587c18a3b35e731165cee65366d5d6d94f (diff)
parent3298811ce85e54c3c766ca7cf1e77bfd66956ab5 (diff)
Merge "dovetail tool: bugfix about setup dovetail"
Diffstat (limited to 'dovetail')
-rw-r--r--dovetail/compliance/debug.yml2
-rw-r--r--dovetail/conf/dovetail_config.yml4
-rw-r--r--dovetail/testcase.py12
3 files changed, 11 insertions, 7 deletions
diff --git a/dovetail/compliance/debug.yml b/dovetail/compliance/debug.yml
index 8cc4b36c..13ba335c 100644
--- a/dovetail/compliance/debug.yml
+++ b/dovetail/compliance/debug.yml
@@ -4,7 +4,7 @@
debug:
name: debug
testcases_list:
- - dovetail.example.tc002
+ - dovetail.example.tc002
- dovetail.ipv6.tc001
- dovetail.nfvi.tc001
- dovetail.nfvi.tc002
diff --git a/dovetail/conf/dovetail_config.yml b/dovetail/conf/dovetail_config.yml
index 837f8840..c8f9fbe4 100644
--- a/dovetail/conf/dovetail_config.yml
+++ b/dovetail/conf/dovetail_config.yml
@@ -9,8 +9,8 @@ creds: '/home/opnfv/dovetail/openstack.creds'
# TO DO: once version scheme settled, adjust accordingly
repo: 'https://github.com/opnfv/dovetail/tree/master/'
-COMPLIANCE_PATH: ./compliance/
-TESTCASE_PATH: ./testcase/
+COMPLIANCE_PATH: compliance/
+TESTCASE_PATH: testcase/
# testsuite supported, should adjust accordingly
testsuite_supported:
- compliance_set
diff --git a/dovetail/testcase.py b/dovetail/testcase.py
index 4310f9b4..dd0fd2b5 100644
--- a/dovetail/testcase.py
+++ b/dovetail/testcase.py
@@ -158,8 +158,10 @@ class Testcase(object):
@classmethod
def load(cls):
- for root, dirs, files in \
- os.walk(dt_cfg.dovetail_config['TESTCASE_PATH']):
+ testcase_dir = os.path.dirname(os.path.abspath(__file__))
+ testcase_path = dt_cfg.dovetail_config['TESTCASE_PATH']
+ abs_testcase_path = os.path.join(testcase_dir, testcase_path)
+ for root, dirs, files in os.walk(abs_testcase_path):
for testcase_file in files:
with open(os.path.join(root, testcase_file)) as f:
testcase_yaml = yaml.safe_load(f)
@@ -254,8 +256,10 @@ class Testsuite:
@classmethod
def load(cls):
- for root, dirs, files in \
- os.walk(dt_cfg.dovetail_config['COMPLIANCE_PATH']):
+ compliance_dir = os.path.dirname(os.path.abspath(__file__))
+ compliance_path = dt_cfg.dovetail_config['COMPLIANCE_PATH']
+ abs_compliance_path = os.path.join(compliance_dir, compliance_path)
+ for root, dirs, files in os.walk(abs_compliance_path):
for testsuite_yaml in files:
with open(os.path.join(root, testsuite_yaml)) as f:
testsuite_yaml = yaml.safe_load(f)