cbuildbot_launch: Flag control the buildroot cleanup
As we consider moving to overlayfs for legacy builders, we need an
option for testing the buildroot maintenance and cleanup. This will
flag control the cleanup of the buildroot based on whether we utilize
source-cache. This should be transparent as the flag is set via the recipe and can be verified in a LED job.
BUG=b:197678613
TEST='local tryjob'
Change-Id: I617e1c0008ecd86832e1e3cd5a1278a534c99c53
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3140363
Reviewed-by: Sean McAllister <smcallis@google.com>
Commit-Queue: Mike Nichols <mikenichols@chromium.org>
Tested-by: Mike Nichols <mikenichols@chromium.org>
diff --git a/scripts/cbuildbot_launch_unittest.py b/scripts/cbuildbot_launch_unittest.py
index 895ad20..409508e 100644
--- a/scripts/cbuildbot_launch_unittest.py
+++ b/scripts/cbuildbot_launch_unittest.py
@@ -73,7 +73,7 @@
self.assertEqual(mock_repo.mock_calls, [
mock.call.PreLoad('/preload/chromeos'),
- mock.call.Sync(detach=True, downgrade_repo=False),
+ mock.call.Sync(jobs=32, detach=True, downgrade_repo=False),
])
def testConfigureGlobalEnvironment(self):
@@ -172,7 +172,7 @@
# Ensure we clean, as expected.
self.assertEqual(mock_clean.mock_calls, [
mock.call('/root', mock_repo, '/root/repository/.cache',
- expected_build_state)])
+ expected_build_state, False)])
# Ensure we checkout, as expected.
self.assertEqual(mock_checkout.mock_calls,
@@ -263,7 +263,7 @@
status=mock.ANY,
branch='branch',
buildroot_layout=2
- ))])
+ ), False)])
# Ensure we checkout, as expected.
self.assertEqual(mock_checkout.mock_calls,