From 77f281a75efe48bc86cb3b9fb2adf4cfdc8724d6 Mon Sep 17 00:00:00 2001 From: David James Date: Mon, 15 Nov 2010 20:39:00 -0800 Subject: [PATCH] Move sanity checks for missing directories until after checkout happens. Preflight clean needs to wait until after the checkout happens before it asserts that all of our overlays exist. BUG=chromium-os:9197 TEST=Ran cbuildbot.py with missing chromiumos-overlay dir Change-Id: If66574f01d1e85741e971919a9fa2da34f85872d Review URL: http://codereview.chromium.org/5069001 --- bin/cbuildbot.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/cbuildbot.py b/bin/cbuildbot.py index 58d5c3e2c3..e723cd6439 100755 --- a/bin/cbuildbot.py +++ b/bin/cbuildbot.py @@ -484,10 +484,6 @@ def _ResolveOverlays(buildroot, overlays): paths = [public_overlay, private_overlay] else: Die('Incorrect overlay configuration: %s' % overlays) - for path in paths: - assert ':' not in path, 'Overlay must not contain colons: %s' % path - if not os.path.isdir(path): - Die('Missing overlay: %s' % path) return paths @@ -536,6 +532,12 @@ def main(): else: _IncrementalCheckout(buildroot) + # Check that all overlays can be found. + for path in overlays: + assert ':' not in path, 'Overlay must not contain colons: %s' % path + if not os.path.isdir(path): + Die('Missing overlay: %s' % path) + chroot_path = os.path.join(buildroot, 'chroot') if not os.path.isdir(chroot_path): _MakeChroot(buildroot)