def create_test_workspace(self): """ Create a test workspace. This function copies the test sources into the working directory. """ fileutils.sync_tree(self.test_dir, self.working_dir())
def tear_up(self): super(PythonDriver, self).tear_up() fileutils.sync_tree(self.test_env['test_dir'], self.test_working_dir()) # See if we expect a failure for this testcase try: comment = self.test_env['expect_failure'] except KeyError: self.expect_failure = False self.expect_failure_comment = '' else: self.expect_failure = True if not (comment is None or isinstance(comment, basestring)): self.result.set_status( 'PROBLEM', 'Invalid "expect_failure" entry: expected a string but got' ' {}'.format(repr(comment))) return # Because of wrapping in the YAML file, we can get multi-line # strings, which is not valid for comments. self.expect_failure_comment = comment.replace('\n', ' ').strip()
def tear_up(self): self.test_tmp = os.path.join(self.global_env['working_dir'], self.test_env['test_name']) sync_tree(self.test_env['test_dir'], self.test_tmp) self.register_path_subst(self.test_tmp, '<TEST_DIR>')
def deploy(self, dest): sync_tree(self.path, dest, delete=True)