From 4a45f975296d9ab3a6418e0d26eb7476d6d4f1f8 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Mon, 4 May 2009 16:56:46 +0100 Subject: [PATCH] Added --builders option to specify the desired builders explicitly --- 0release | 1 + compile.py | 7 +++++-- tests/testrelease.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/0release b/0release index f644fff..7a644cd 100755 --- a/0release +++ b/0release @@ -13,6 +13,7 @@ parser = OptionParser(usage = """usage: %prog [options] LOCAL-FEED Run this command from a new empty directory to set things up.""") +parser.add_option("", "--builders", help="comma-separated list of builders for binaries", metavar='LIST') parser.add_option("", "--build-slave", help="compile a binary a source release candidate", action='store_true') parser.add_option("-k", "--key", help="GPG key to use for signing", action='store', metavar='KEYID') parser.add_option("-v", "--verbose", help="more verbose output", action='count') diff --git a/compile.py b/compile.py index 4ecab7c..8f4a96f 100644 --- a/compile.py +++ b/compile.py @@ -36,13 +36,16 @@ class Compiler: else: info("No builders.conf configuration; will build a binary for this host only") - builders = self.config.get('global', 'builders').strip() + if options.builders is not None: + builders = options.builders + else: + builders = self.config.get('global', 'builders').strip() if builders: self.targets = [x.strip() for x in builders.split(',')] info("%d build targets configured: %s", len(self.targets), self.targets) else: self.targets = [] - info("No builders set in configuration; no binaries will be built") + info("No builders set; no binaries will be built") else: self.targets = [] diff --git a/tests/testrelease.py b/tests/testrelease.py index 12a89af..d2bf416 100755 --- a/tests/testrelease.py +++ b/tests/testrelease.py @@ -88,7 +88,7 @@ class TestRelease(unittest.TestCase): support.check_call(['tar', 'xzf', test_repo_c]) make_releases_dir(src_feed = '../c-prog/c-prog.xml', auto_upload = True) - child = subprocess.Popen(['./make-release', '-k', 'Testing'], stdin = subprocess.PIPE) + child = subprocess.Popen(['./make-release', '-k', 'Testing', '--builders=host'], stdin = subprocess.PIPE) unused, unused = child.communicate('\nP\n\n') assert child.returncode == 0 -- 2.11.4.GIT