diff options
author | Mason Test Runner <mason@runner> | 2014-12-17 11:35:54 +0000 |
---|---|---|
committer | Mason Test Runner <mason@runner> | 2014-12-17 11:35:54 +0000 |
commit | 4b210c187db2a0310ee97f0bc0a205d36606720b (patch) | |
tree | 1d13622893414ff69c440f61b8f423089f0b9e94 | |
parent | 7a27b238b697e0c36b1de240174e08ff920d508c (diff) | |
download | system-tests-4b210c187db2a0310ee97f0bc0a205d36606720b.tar.gz |
Hobble build_test to use baserock:baserock/definitions mastersam/mason-tests/fixes
Ideally we'd test that the branch under test is capable of building itself, but
it requires some work before that is possible. The branch under test is only
available in /var/lib/zuul/git on the Mason machine, and for the test devel
instance to be able to build it we need to add some way of sharing it.
As a temporary hack, let's just build 'master'. That's still an OK test.
-rw-r--r-- | mason/tests/build_test.py | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/mason/tests/build_test.py b/mason/tests/build_test.py index a50eef7..c2ae566 100644 --- a/mason/tests/build_test.py +++ b/mason/tests/build_test.py @@ -83,9 +83,16 @@ class Runner(mason.runners.JobRunner): argv.extend(args) instance.runcmd(argv, **kwargs) - repo = self.morph_helper.sb.root_repository_url - ref = self.morph_helper.defs_repo.HEAD - sha1 = self.morph_helper.defs_repo.resolve_ref_to_commit(ref) + # The repo Mason build and deployed this system from is only + # available on the system as /var/lib/ + + #repo = self.morph_helper.sb.root_repository_url + #ref = self.morph_helper.defs_repo.HEAD + #sha1 = self.morph_helper.defs_repo.resolve_ref_to_commit(ref) + + repo = 'baserock:baserock/definitions' + ref = 'master' + morph_cmd('init', '/src/ws', stdin=None, stdout=logfile, stderr=logfile) chdir = '/src/ws' @@ -93,12 +100,14 @@ class Runner(mason.runners.JobRunner): morph_cmd('checkout', repo, ref, chdir=chdir, stdin=None, stdout=logfile, stderr=logfile) # TODO: Add a morph subcommand that gives the path to the root repository. - repo_path = os.path.relpath( - self.morph_helper.sb.get_git_directory_name(repo), - self.morph_helper.sb.root_directory) - chdir = os.path.join(chdir, ref, repo_path) - - instance.runcmd(['git', 'reset', '--hard', sha1], chdir=chdir, + #repo_path = os.path.relpath( + # self.morph_helper.sb.get_git_directory_name(repo), + # self.morph_helper.sb.root_directory) + #chdir = os.path.join(chdir, ref, repo_path) + chdir = os.path.join(chdir, ref, 'baserock', 'baserock', + 'definitions') + + instance.runcmd(['git', 'reset', '--hard', 'HEAD'], chdir=chdir, stdin=None, stdout=logfile, stderr=logfile) logfile.write('Building test systems for %s\n' % system_path) for to_build_path, to_build_morph in systems.iteritems(): |