From 4b210c187db2a0310ee97f0bc0a205d36606720b Mon Sep 17 00:00:00 2001 From: Mason Test Runner Date: Wed, 17 Dec 2014 11:35:54 +0000 Subject: Hobble build_test to use baserock:baserock/definitions master 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. --- mason/tests/build_test.py | 27 ++++++++++++++++++--------- 1 file 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(): -- cgit v1.2.1