From 2a76a64981faf1cee84b6b7bdfa1894ba2e2e954 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 2 Mar 2015 17:05:15 -0700 Subject: [PATCH 1/2] buildman: Correct toolchain download feature Commit d908898 updated the ScanPath() function but not its documentation and not all its callers. This breaks the toolchain check after it is downloaded. Fix it. Signed-off-by: Simon Glass Acked-by: Heiko Schocher --- tools/buildman/toolchain.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 537797a..051da11 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -465,11 +465,15 @@ class Toolchains: # Check that the toolchain works print 'Testing' dirpath = os.path.join(dest, path) - compiler_fname = self.ScanPath(dirpath, True) - if not compiler_fname: + compiler_fname_list = self.ScanPath(dirpath, True) + if not compiler_fname_list: print 'Could not locate C compiler - fetch failed.' return 1 - toolchain = Toolchain(compiler_fname, True, True) + if len(compiler_fname_list) != 1: + print ('Internal error, ambiguous toolchains: %s' % + (', '.join(compiler_fname))) + return 1 + toolchain = Toolchain(compiler_fname_list[0], True, True) # Make sure that it will be found by buildman if not self.TestSettingsHasPath(dirpath): From 63c619eefde619731370b42ae2a2c16a86b23597 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 5 Feb 2015 22:06:11 -0700 Subject: [PATCH 2/2] buildman: Add a space before the list of boards Tweak the output slightly so we don't get things like: - board1 board2+ board3 board4 There should be a space before the '+'. Signed-off-by: Simon Glass --- tools/buildman/builder.py | 2 +- tools/buildman/test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 1b0ad99..54f3292 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -664,7 +664,7 @@ class Builder: arch = 'unknown' str = self.col.Color(color, ' ' + target) if not arch in done_arch: - str = self.col.Color(color, char) + ' ' + str + str = ' %s %s' % (self.col.Color(color, char), str) done_arch[arch] = True if not arch in arch_list: arch_list[arch] = str diff --git a/tools/buildman/test.py b/tools/buildman/test.py index c0ad5d0..7642d94 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -169,7 +169,7 @@ class TestBuild(unittest.TestCase): expected_colour = col.GREEN if ok else col.RED expect = '%10s: ' % arch # TODO(sjg@chromium.org): If plus is '', we shouldn't need this - expect += col.Color(expected_colour, plus) + expect += ' ' + col.Color(expected_colour, plus) expect += ' ' for board in boards: expect += col.Color(expected_colour, ' %s' % board)