diff options
author | Mike Frysinger <vapier@chromium.org> | 2014-09-12 03:39:28 -0400 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-09-25 22:49:54 +0000 |
commit | 6f601fe168ac6cff40fd3040e5a2d234120adc93 (patch) | |
tree | 7fff99c2ba6db0c2b3bd108b0397f4423ee8e44b /cbuildbot/stages | |
parent | 35bce769ec62d046d2c73447903c72d6d8dc9e99 (diff) | |
download | chromite-6f601fe168ac6cff40fd3040e5a2d234120adc93.tar.gz |
overlays: look up boards by repo_name rather than path
Refactored the unittests too to build up a local tree of files to test
against. This way the public/private logic can be verified regardless
of the manifest you have.
BUG=chromium:407604
TEST=`./cbuildbot/run_tests` works w/private & w/public manifest
TEST=`cros_list_overlays` is unchanged
TEST=`cros_list_overlays --board amd64-generic` is unchanged (pub only)
TEST=`cros_list_overlays --board parrot` is unchanged (pub & priv)
TEST=`cros_list_overlays --board parrot_ivb` is unchanged (variant pub & priv)
TEST=`cros_list_overlays --board samus` is unchanged (priv only)
Change-Id: I983a4c8651226ad9d70291e6d70939afe9754ded
Reviewed-on: https://chromium-review.googlesource.com/218234
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'cbuildbot/stages')
-rwxr-xr-x | cbuildbot/stages/artifact_stages_unittest.py | 2 | ||||
-rwxr-xr-x | cbuildbot/stages/build_stages_unittest.py | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/cbuildbot/stages/artifact_stages_unittest.py b/cbuildbot/stages/artifact_stages_unittest.py index ea52785ce..ff1dd96cc 100755 --- a/cbuildbot/stages/artifact_stages_unittest.py +++ b/cbuildbot/stages/artifact_stages_unittest.py @@ -551,7 +551,7 @@ class UploadTestArtifactsStageTest(build_stages_unittest.AllConfigsTestCase): def testAllConfigs(self): """Test all major configurations""" - self.RunAllConfigs(self.RunTestsWithBotId) + self.RunAllConfigs(self.RunTestsWithBotId, skip_missing=True) # TODO: Delete ArchivingMock once ArchivingStage is deprecated. diff --git a/cbuildbot/stages/build_stages_unittest.py b/cbuildbot/stages/build_stages_unittest.py index 421e7855f..6b0bbe3bf 100755 --- a/cbuildbot/stages/build_stages_unittest.py +++ b/cbuildbot/stages/build_stages_unittest.py @@ -25,6 +25,7 @@ from chromite.lib import git from chromite.lib import parallel from chromite.lib import parallel_unittest from chromite.lib import partial_mock +from chromite.lib import portage_util from chromite.cbuildbot.stages.generic_stages_unittest import patch from chromite.cbuildbot.stages.generic_stages_unittest import patches @@ -205,7 +206,7 @@ class AllConfigsTestCase(generic_stages_unittest.AbstractStageTest): msg = '%s failed the following test:\n%s' % (self._bot_id, ex) raise AssertionError(msg) - def RunAllConfigs(self, task): + def RunAllConfigs(self, task, skip_missing=False): """Run |task| against all major configurations""" with parallel.BackgroundTaskRunner(task) as queue: # Loop through all major configuration types and pick one from each. @@ -216,6 +217,15 @@ class AllConfigsTestCase(generic_stages_unittest.AbstractStageTest): # build packages. cfg = config.config[bot_id] if cfg.boards: + # Skip boards w/out a local overlay. Like when running a + # public manifest and testing private-only boards. + if skip_missing: + try: + for b in cfg.boards: + portage_util.FindPrimaryOverlay(constants.BOTH_OVERLAYS, b) + except portage_util.MissingOverlayException: + continue + queue.put([bot_id]) break |