cros_branch: Sync all groups by default
Cros branch expects non-default branches to be present regardless of the
tot annotation. By syncing all the branches cros branch will not fail
with kernel-next present.
There is nothing inherently wrong with creating a branch
from kernel-next/chromeos-next. Branching it will keep the ref around.
I think with this change we can remove the ToT annotation from
kernel-next.
BUG=b:144146564, chromium:992138, chromium:1017892
TEST=cros branch --push create --stabilize --descriptor test-all
--version 12656.0.0
Verified the sync was successful. I am not able to create branches
though.
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I08475837192867e26f55a22aeef61c1acb7f239d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1906528
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: Sean Abraham <seanabraham@chromium.org>
diff --git a/scripts/repo_sync_manifest_unittest.py b/scripts/repo_sync_manifest_unittest.py
index 9053193..e3ce493 100644
--- a/scripts/repo_sync_manifest_unittest.py
+++ b/scripts/repo_sync_manifest_unittest.py
@@ -74,6 +74,7 @@
branch='master',
git_cache_dir=None,
repo_url=None,
+ groups=None,
),
mock.call().Sync(detach=True, local_manifest=None)
])
@@ -95,6 +96,7 @@
branch='master',
git_cache_dir=None,
repo_url=None,
+ groups=None,
),
mock.call().Sync(detach=True, local_manifest=None)
])
@@ -116,6 +118,7 @@
branch='master',
git_cache_dir=None,
repo_url=None,
+ groups=None,
),
mock.call().Sync(detach=True, local_manifest=None)
])
@@ -134,6 +137,7 @@
branch='branch',
git_cache_dir=None,
repo_url=None,
+ groups=None,
),
mock.call().Sync(detach=True, local_manifest=None)
])
@@ -165,6 +169,7 @@
branch='master',
git_cache_dir=None,
repo_url=None,
+ groups=None,
),
mock.call().Sync(detach=True, local_manifest='resolved_buildspec')
])
@@ -194,6 +199,7 @@
branch='master',
git_cache_dir=None,
repo_url=None,
+ groups=None,
),
mock.call().Sync(detach=True, local_manifest='resolved_buildspec')
])
@@ -222,6 +228,7 @@
branch='master',
git_cache_dir=None,
repo_url=None,
+ groups=None,
),
mock.call().Sync(detach=True, local_manifest='resolved_buildspec')
])
@@ -251,6 +258,7 @@
branch='master',
git_cache_dir=None,
repo_url=None,
+ groups=None,
),
mock.call().Sync(detach=True, local_manifest='resolved_buildspec')
])
@@ -286,6 +294,30 @@
branch='master',
git_cache_dir=None,
repo_url=None,
+ groups=None,
+ ),
+ mock.call().Sync(detach=True, local_manifest=self.manifest)
+ ])
+
+ def testGroups(self):
+ repo_sync_manifest.main([
+ '--repo-root', self.repo_dir,
+ '--manifest-file', self.manifest,
+ '--groups', 'all'
+ ])
+
+ # Ensure manifest_versions is not updated.
+ self.assertEqual(self.refresh_manifest_mock.mock_calls, [])
+
+ # Ensure RepoRepository created and Sync'd as expected.
+ self.assertEqual(self.repo_mock.mock_calls, [
+ mock.call(
+ directory=self.repo_dir,
+ manifest_repo_url=self.INT_MANIFEST_URL,
+ branch='master',
+ git_cache_dir=None,
+ repo_url=None,
+ groups='all',
),
mock.call().Sync(detach=True, local_manifest=self.manifest)
])
@@ -309,6 +341,7 @@
branch='master',
git_cache_dir=self.git_cache,
repo_url=self.repo_url,
+ groups=None,
),
mock.call().PreLoad(self.preload_src),
mock.call().Sync(detach=True, local_manifest=None)