From 56f5ec837287885ad44947671b76350a7c271f62 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 21 May 2014 17:14:13 +0000 Subject: Use distbuild instead of local builds --- config.py | 8 ++++++++ test_trove_upgrades.py | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 69a69ee..45e2fdf 100644 --- a/config.py +++ b/config.py @@ -35,6 +35,14 @@ BOOT_TIMEOUT=20 # want to use a custom version of Morph if you're developing a Morph feature. MORPH_COMMAND = 'morph' +# This is a wart. Morph should handle this itself (ideally by having one +# distbuild controller able to divide jobs among workers of many architectures. +DISTBUILD_INITIATORS = { + 'armv7lhf': '10.24.1.134', + 'x86_32': '10.24.1.136', + 'x86_64': '10.24.1.164', +} + BUILD_TEMPDIR = '/src/tmp' BRANCH = 'master' diff --git a/test_trove_upgrades.py b/test_trove_upgrades.py index 596f000..18ec5d9 100644 --- a/test_trove_upgrades.py +++ b/test_trove_upgrades.py @@ -89,12 +89,22 @@ class Deployment(object): self.system_morph_name = system_morph_name self.deploy_morph_name = deploy_morph_name + loader = morphlib.morphloader.MorphologyLoader() + system_morph_file = os.path.join( + self.branch.morphs_dir, system_morph_name + '.morph') + self.system_morph = loader.load_from_file(system_morph_file) + + self.arch = self.system_morph['arch'] + def create_config(self): pass def run_build(self): - run_morph( - ['build', self.system_morph_name], cwd=self.branch.branch_dir) + controller = config.DISTBUILD_INITIATORS[self.arch] + command = [ + 'distbuild', '--controller-initiator-address=%s' % controller, + self.system_morph_name] + run_morph(command, cwd=self.branch.branch_dir) def run_deploy(self, autostart=False): autostart_param = \ -- cgit v1.2.1