summaryrefslogtreecommitdiff
path: root/cbuildbot/cbuildbot_config_unittest.py
diff options
context:
space:
mode:
authorAviv Keshet <akeshet@chromium.org>2014-12-29 13:19:13 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-12-30 22:04:03 +0000
commit27a7510f2135800636a2075401548581faccb8d0 (patch)
tree5f9607bf65c15e44e4cc9fd7801e7723e5cba649 /cbuildbot/cbuildbot_config_unittest.py
parent7fbab63f5504c81e66b71649d6a5a5a073883d2e (diff)
downloadchromite-27a7510f2135800636a2075401548581faccb8d0.tar.gz
cbuildbot_config: add a unit test banning simultaneous useflags foo and -foo
BUG=chromium:406633 TEST=Unit tests, config diff examination. Change-Id: I9a53627cb8305571bec27e1ecbdebe7600f06fd6 Reviewed-on: https://chromium-review.googlesource.com/237894 Reviewed-by: Aviv Keshet <akeshet@chromium.org> Tested-by: Aviv Keshet <akeshet@chromium.org> Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Diffstat (limited to 'cbuildbot/cbuildbot_config_unittest.py')
-rwxr-xr-xcbuildbot/cbuildbot_config_unittest.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/cbuildbot/cbuildbot_config_unittest.py b/cbuildbot/cbuildbot_config_unittest.py
index 4cce33844..42bd76777 100755
--- a/cbuildbot/cbuildbot_config_unittest.py
+++ b/cbuildbot/cbuildbot_config_unittest.py
@@ -584,6 +584,16 @@ class CBuildBotTest(cros_test_lib.TestCase):
constants.OFFICIAL_MANIFEST,
msg % build_name)
+ def testNoShadowedUseflags(self):
+ """Configs should not have both useflags x and -x."""
+ msg = ('%s contains useflag %s and -%s.')
+ for build_name, config in cbuildbot_config.config.iteritems():
+ useflag_set = set(config['useflags'])
+ for flag in useflag_set:
+ if not flag.startswith('-'):
+ self.assertFalse('-' + flag in useflag_set,
+ msg % (build_name, flag, flag))
+
class FindFullTest(cros_test_lib.TestCase):
"""Test locating of official build for a board."""