diff options
author | Chase Qi <chase.qi@linaro.org> | 2016-12-02 10:43:46 +0800 |
---|---|---|
committer | Chase Qi <chase.qi@linaro.org> | 2016-12-02 10:51:01 +0800 |
commit | 33eb765e3d4ad777525cecd4090205c2db124194 (patch) | |
tree | bd82ece814afed2d59cdad7f1b75ff23899219e2 | |
parent | 0d75a6be64b49303987fca1d9f4a8591b6f3818b (diff) |
test-runner: fix version check for manual test
When '-k manual' specified, test-runner only copy 'manual' folder to
output directory, which isn't a valid git repo. From there, 'git
checkout' or 'git rev-parse HEAD' fails.
Change-Id: I005501efacb46fb49729995d112f8498164d8ad0
Signed-off-by: Chase Qi <chase.qi@linaro.org>
-rwxr-xr-x | automated/utils/test-runner.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/automated/utils/test-runner.py b/automated/utils/test-runner.py index 5c51af8..ed8b755 100755 --- a/automated/utils/test-runner.py +++ b/automated/utils/test-runner.py @@ -107,16 +107,11 @@ class TestSetup(object): def copy_test_repo(self): self.validate_env() shutil.rmtree(self.test_path, ignore_errors=True) - if self.test_kind == 'manual': - test_dir_path = os.path.join(self.repo_path, self.repo_test_path.rsplit("/", 1)[0]) - shutil.copytree(test_dir_path, self.test_path, symlinks=True) - self.logger.info('Test copied to: %s' % self.test_path) - else: - if self.repo_path in self.test_path: - self.logger.error("Cannot copy repository into itself. Please choose output directory outside repository path") - sys.exit(1) - shutil.copytree(self.repo_path, self.test_path, symlinks=True) - self.logger.info('Test repo copied to: %s' % self.test_path) + if self.repo_path in self.test_path: + self.logger.error("Cannot copy repository into itself. Please choose output directory outside repository path") + sys.exit(1) + shutil.copytree(self.repo_path, self.test_path, symlinks=True) + self.logger.info('Test repo copied to: %s' % self.test_path) def checkout_version(self): if self.test_version: |