diff options
author | Mason Test Runner <mason@runner> | 2014-12-17 11:17:23 +0000 |
---|---|---|
committer | Mason Test Runner <mason@runner> | 2014-12-17 11:17:23 +0000 |
commit | 7a27b238b697e0c36b1de240174e08ff920d508c (patch) | |
tree | 5ca1b2357722d4c9ad9e96865fbba2be9c0d112e | |
parent | 159b93525e978fab802528f27625aa537c3709db (diff) | |
download | system-tests-7a27b238b697e0c36b1de240174e08ff920d508c.tar.gz |
Fix build_test.py to deploy from repo in /var/lib/zuul/gits
The code here is copied and pasted from build.py, and should really be
factored out into a base class.
-rw-r--r-- | mason/tests/build_test.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/mason/tests/build_test.py b/mason/tests/build_test.py index 9487244..a50eef7 100644 --- a/mason/tests/build_test.py +++ b/mason/tests/build_test.py @@ -126,13 +126,6 @@ class Runner(mason.runners.JobRunner): self.workspace = '/root/mason-workspace' self.zuul_url = self.job_arguments['ZUUL_URL'] - url = urlparse.urlparse(self.zuul_url) - self.defs_checkout = os.path.join(self.workspace, - self.commit, - url.hostname, - '8080', - self.project) - self._do_git_config() if os.path.exists(self.workspace): @@ -140,9 +133,23 @@ class Runner(mason.runners.JobRunner): cliapp.runcmd(['morph', 'init', self.workspace]) - repo = 'http://%s:8080/%s' % (url.hostname, self.project) - cliapp.runcmd(['morph', 'checkout', repo, self.commit], + zuul_gits_dir = 'var/lib/zuul/git/' + + repo_dir = os.path.join('/', zuul_gits_dir, self.project) + cliapp.runcmd(['morph', 'checkout', repo_dir, self.commit], cwd=self.workspace) + + # Morph allows us to rename the system branch directory from the + # ludicrously long name that it chose for us. + temp_defs_checkout = os.path.join( + self.workspace, self.commit, zuul_gits_dir, self.project) + self.defs_checkout = os.path.join( + self.workspace, self.commit, self.project) + logging.debug( + 'Renaming system-branch directory from %s to %s', + temp_defs_checkout, self.defs_checkout) + os.renames(temp_defs_checkout, self.defs_checkout) + self.morph_helper = mason.util.MorphologyHelper(self.defs_checkout) @mason.util.job_step |