diff options
author | xudan <xudan16@huawei.com> | 2018-12-20 01:49:22 -0500 |
---|---|---|
committer | xudan <xudan16@huawei.com> | 2018-12-20 21:57:03 -0500 |
commit | 78b0062ce9dc4d23b967112a0896f12cc6526e1c (patch) | |
tree | 9709b51d30bf87a1b2458f118d90cd1b2610e53c /dovetail/test_runner.py | |
parent | 8ab783f403984b3ef9a6c3010a9a81c0f29c4236 (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/test_runner.py')
-rw-r--r-- | dovetail/test_runner.py | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/dovetail/test_runner.py b/dovetail/test_runner.py index 884ce1ad..2fa1eee4 100644 --- a/dovetail/test_runner.py +++ b/dovetail/test_runner.py @@ -63,26 +63,6 @@ class DockerRunner(Runner): def create_log(cls): cls.logger = dt_logger.Logger(__name__ + '.DockerRunner').getLogger() - def pre_copy(self, container=None, dest_path=None, - src_file=None, exist_file=None): - if not container: - self.logger.error("Container instance is None.") - return None - if not dest_path: - self.logger.error("There has no dest_path in {} config file." - .format(self.testcase.name())) - return None - if src_file: - self.testcase.mk_src_file() - file_path = dt_cfg.dovetail_config[self.type]['result']['dir'] - src_path = os.path.join(file_path, src_file) - if exist_file: - file_path = dt_cfg.dovetail_config[self.type]['config']['dir'] - src_path = os.path.join(file_path, 'pre_config', exist_file) - - container.copy_file(src_path, dest_path) - return dest_path - def run(self): container = Container(self.testcase) docker_image = container.get_docker_image() @@ -104,14 +84,7 @@ class DockerRunner(Runner): self.logger.debug('container id: {}'.format(container_id)) - dest_path = self.testcase.pre_copy_path('dest_path') - src_file_name = self.testcase.pre_copy_path('src_file') - exist_file_name = self.testcase.pre_copy_path('exist_src_file') - - if src_file_name or exist_file_name: - if not self.pre_copy(container, dest_path, src_file_name, - exist_file_name): - return + self.testcase.mk_src_file() cmds = self.testcase.pre_condition() if cmds: |