diff options
author | Simon Glass <sjg@chromium.org> | 2015-03-02 17:05:15 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-03-05 16:14:01 -0700 |
commit | 2a76a64981faf1cee84b6b7bdfa1894ba2e2e954 (patch) | |
tree | 6b9f52b02daf07f305c153ec7a0ef1ede0328184 /tools | |
parent | 7ae8350f67eea861280a4cbd2d067777a0e87153 (diff) | |
download | u-boot-2a76a64981faf1cee84b6b7bdfa1894ba2e2e954.tar.gz |
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 <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/buildman/toolchain.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 537797ad53..051da11ef0 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): |