summaryrefslogtreecommitdiff
path: root/tools/buildman/test.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-12-01 17:34:05 -0700
committerSimon Glass <sjg@chromium.org>2015-01-14 21:16:54 -0800
commit9b83bfdcb0baac4c2f986c600a2a7c2e946ad17c (patch)
tree2662f4af2f633ee98b95a4ddb11868c97a73a344 /tools/buildman/test.py
parentcc935295f24580a4cb7c869f489ea99273fb4f92 (diff)
downloadu-boot-imx-9b83bfdcb0baac4c2f986c600a2a7c2e946ad17c.zip
u-boot-imx-9b83bfdcb0baac4c2f986c600a2a7c2e946ad17c.tar.gz
u-boot-imx-9b83bfdcb0baac4c2f986c600a2a7c2e946ad17c.tar.bz2
buildman: Allow architecture to alias to multiple toolchains
Some archs have need than one alias, so support a list of alises in the ..buildman file. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/test.py')
-rw-r--r--tools/buildman/test.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index d19f6ea..25be43f 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -394,5 +394,20 @@ class TestBuild(unittest.TestCase):
build.commit_count = 0
self.CheckDirs(build, '')
+ def testToolchainAliases(self):
+ self.assertTrue(self.toolchains.Select('arm') != None)
+ with self.assertRaises(ValueError):
+ self.toolchains.Select('no-arch')
+ with self.assertRaises(ValueError):
+ self.toolchains.Select('x86')
+
+ self.toolchains = toolchain.Toolchains()
+ self.toolchains.Add('x86_64-linux-gcc', test=False)
+ self.assertTrue(self.toolchains.Select('x86') != None)
+
+ self.toolchains = toolchain.Toolchains()
+ self.toolchains.Add('i386-linux-gcc', test=False)
+ self.assertTrue(self.toolchains.Select('x86') != None)
+
if __name__ == "__main__":
unittest.main()