repository: Downgrade repo version in identified branches.
Add the ability to downgrade the repo version for specifically targeted
branches, to work around the python upgrade that currently prevents
building older branches, specifically R79.
This also adds some high level debugging steps to help debugging repo
issues ongoing.
BUG=b:178532384
TEST=`run_test`
Change-Id: I7f55d8d02b261af15f43fc623bc10971b94a0d86
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2660029
Commit-Queue: Mike Nichols <mikenichols@chromium.org>
Tested-by: Mike Nichols <mikenichols@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Dhanya Ganesh <dhanyaganesh@chromium.org>
diff --git a/scripts/cbuildbot_launch_unittest.py b/scripts/cbuildbot_launch_unittest.py
index bf8722b..2b74611 100644
--- a/scripts/cbuildbot_launch_unittest.py
+++ b/scripts/cbuildbot_launch_unittest.py
@@ -74,12 +74,14 @@
"""Test InitialCheckout with minimum settings."""
mock_repo = mock.MagicMock()
mock_repo.branch = 'branch'
+ argv = ['-r', '/root', 'config']
+ options = cbuildbot_launch.PreParseArguments(argv)
- cbuildbot_launch.InitialCheckout(mock_repo)
+ cbuildbot_launch.InitialCheckout(mock_repo, options)
self.assertEqual(mock_repo.mock_calls, [
mock.call.PreLoad('/preload/chromeos'),
- mock.call.Sync(detach=True),
+ mock.call.Sync(detach=True, downgrade_repo=False),
])
def testConfigureGlobalEnvironment(self):
@@ -182,7 +184,7 @@
# Ensure we checkout, as expected.
self.assertEqual(mock_checkout.mock_calls,
- [mock.call(mock_repo)])
+ [mock.call(mock_repo, options)])
# Ensure we invoke cbuildbot, as expected.
self.assertCommandCalled(
@@ -273,7 +275,7 @@
# Ensure we checkout, as expected.
self.assertEqual(mock_checkout.mock_calls,
- [mock.call(mock_repo)])
+ [mock.call(mock_repo, options)])
# Ensure we invoke cbuildbot, as expected.
self.assertCommandCalled(