From a8cf575d68e7e211292d967f4a12cf609a028b20 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Fri, 15 Jul 2022 20:31:33 +0000 Subject: Omit local_manifest groups from superproject override. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we create superproject_override.xml, do not include projects that are present from local_manifests/*. Such projects are fully under the control of the local_manifests/ file. Bug: b/238934278 Test: manual, ./run_tests Change-Id: I40382ceb82d9cf7b8dc7b5f2abed3f6d4d80017e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/340877 Tested-by: Xin Li Reviewed-by: Xin Li Reviewed-by: Sam Saccone 🐐 --- tests/test_manifest_xml.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'tests/test_manifest_xml.py') diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py index 85c20733..48403c0d 100644 --- a/tests/test_manifest_xml.py +++ b/tests/test_manifest_xml.py @@ -252,6 +252,37 @@ class XmlManifestTests(ManifestParseTestCase): '') self.assertEqual(manifest.ToDict(), {}) + def test_toxml_omit_local(self): + """Does not include local_manifests projects when omit_local=True.""" + manifest = self.getXmlManifest( + '' + '' + '' + '' + '' + '') + self.assertEqual( + manifest.ToXml(omit_local=True).toxml(), + '' + '' + '') + + def test_toxml_with_local(self): + """Does include local_manifests projects when omit_local=False.""" + manifest = self.getXmlManifest( + '' + '' + '' + '' + '' + '') + self.assertEqual( + manifest.ToXml(omit_local=False).toxml(), + '' + '' + '' + '') + def test_repo_hooks(self): """Check repo-hooks settings.""" manifest = self.getXmlManifest(""" -- cgit v1.2.3-54-g00ecf