summaryrefslogtreecommitdiffstats
path: root/dovetail/testcase.py
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2018-12-20 01:49:22 -0500
committerxudan <xudan16@huawei.com>2018-12-20 21:57:03 -0500
commit78b0062ce9dc4d23b967112a0896f12cc6526e1c (patch)
tree9709b51d30bf87a1b2458f118d90cd1b2610e53c /dovetail/testcase.py
parent8ab783f403984b3ef9a6c3010a9a81c0f29c4236 (diff)
Simplify project conf files
1. use copy commands instead of pre_copy 2. remove redundant items in project conf files 3. make the volume mapping clearer Change-Id: I6c6aa58fac65d7e40105e0a54f6544ee5c47db31 Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/testcase.py')
-rw-r--r--dovetail/testcase.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/dovetail/testcase.py b/dovetail/testcase.py
index b79bcfa7..74fbbea8 100644
--- a/dovetail/testcase.py
+++ b/dovetail/testcase.py
@@ -136,21 +136,20 @@ class Testcase(object):
return post_condition
def mk_src_file(self):
- testcase_src_file = self.pre_copy_path('src_file')
- try:
- file_path = os.path.join(dt_cfg.dovetail_config['result_dir'],
- testcase_src_file)
- with open(file_path, 'w+') as src_file:
- if self.sub_testcase() is not None:
+ test_list = os.path.join(dt_cfg.dovetail_config['result_dir'],
+ 'tempest_custom.txt')
+ if self.sub_testcase() is not None:
+ try:
+ with open(test_list, 'w+') as src_file:
for sub_test in self.sub_testcase():
self.logger.debug(
'Save test cases {}'.format(sub_test))
src_file.write(sub_test + '\n')
- self.logger.debug('Save test cases to {}'.format(file_path))
- return file_path
- except Exception:
- self.logger.exception('Failed to save: {}'.format(file_path))
- return None
+ self.logger.debug('Save test cases to {}'.format(test_list))
+ return test_list
+ except Exception:
+ self.logger.exception('Failed to save: {}'.format(test_list))
+ return None
def run(self):
runner = TestRunnerFactory.create(self)
@@ -294,8 +293,7 @@ class FunctestTestcase(Testcase):
# patch inside the functest container
if dt_cfg.dovetail_config['no_api_validation']:
patch_cmd = os.path.join(
- dt_cfg.dovetail_config['functest']['config']['dir'],
- 'patches',
+ dt_cfg.dovetail_config['functest']['patches_dir'],
'functest',
'disable-api-validation',
'apply.sh')