summaryrefslogtreecommitdiffstats
path: root/tools/buildman/func_test.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-09-05 19:00:15 -0600
committerSimon Glass <sjg@chromium.org>2014-09-09 16:38:28 -0600
commit8b985eebd0f7582614399fdf6c108a81ab446ae7 (patch)
tree1001d27306e586a65b75adc7fc30aa2d07c3a092 /tools/buildman/func_test.py
parentfd03d63f347e28e4e4394245210f048c82c9b085 (diff)
downloadblackbird-obmc-uboot-8b985eebd0f7582614399fdf6c108a81ab446ae7.tar.gz
blackbird-obmc-uboot-8b985eebd0f7582614399fdf6c108a81ab446ae7.zip
buildman: Avoid looking at config file or toolchains in tests
These files may not exist in the environment, or may not be suitable for testing. Provide our own config file and our own toolchains when running tests. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/func_test.py')
-rw-r--r--tools/buildman/func_test.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index 8711f9c131..b92cde3607 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -10,6 +10,7 @@ import sys
import tempfile
import unittest
+import bsettings
import cmdline
import command
import control
@@ -17,6 +18,22 @@ import gitutil
import terminal
import toolchain
+settings_data = '''
+# Buildman settings file
+
+[toolchain]
+
+[toolchain-alias]
+
+[make-flags]
+src=/home/sjg/c/src
+chroot=/home/sjg/c/chroot
+vboot=USE_STDINT=1 VBOOT_DEBUG=1 MAKEFLAGS_VBOOT=DEBUG=1 CFLAGS_EXTRA_VBOOT=-DUNROLL_LOOPS VBOOT_SOURCE=${src}/platform/vboot_reference
+chromeos_coreboot=VBOOT=${chroot}/build/link/usr ${vboot}
+chromeos_daisy=VBOOT=${chroot}/build/daisy/usr ${vboot}
+chromeos_peach=VBOOT=${chroot}/build/peach_pit/usr ${vboot}
+'''
+
class TestFunctional(unittest.TestCase):
"""Functional test for buildman.
@@ -36,6 +53,8 @@ class TestFunctional(unittest.TestCase):
command.test_result = self._HandleCommand
self._toolchains = toolchain.Toolchains()
self._toolchains.Add('gcc', test=False)
+ bsettings.Setup(None)
+ bsettings.AddFile(settings_data)
def tearDown(self):
shutil.rmtree(self._base_dir)
OpenPOWER on IntegriCloud