diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_git_superproject.py | 3 | ||||
-rw-r--r-- | tests/test_manifest_xml.py | 31 |
2 files changed, 31 insertions, 3 deletions
diff --git a/tests/test_git_superproject.py b/tests/test_git_superproject.py index 603694d2..0ad9b01d 100644 --- a/tests/test_git_superproject.py +++ b/tests/test_git_superproject.py | |||
@@ -312,9 +312,6 @@ class SuperprojectTestCase(unittest.TestCase): | |||
312 | '<project groups="notdefault,platform-' + self.platform + '" ' | 312 | '<project groups="notdefault,platform-' + self.platform + '" ' |
313 | 'name="platform/art" path="art" ' | 313 | 'name="platform/art" path="art" ' |
314 | 'revision="2c2724cb36cd5a9cec6c852c681efc3b7c6b86ea" upstream="refs/heads/main"/>' | 314 | 'revision="2c2724cb36cd5a9cec6c852c681efc3b7c6b86ea" upstream="refs/heads/main"/>' |
315 | '<project clone-depth="1" groups="' + local_group + '" ' | ||
316 | 'name="platform/vendor/x" path="vendor/x" remote="goog" ' | ||
317 | 'revision="master-with-vendor"/>' | ||
318 | '<superproject name="superproject"/>' | 315 | '<superproject name="superproject"/>' |
319 | '</manifest>') | 316 | '</manifest>') |
320 | 317 | ||
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): | |||
252 | '<manifest></manifest>') | 252 | '<manifest></manifest>') |
253 | self.assertEqual(manifest.ToDict(), {}) | 253 | self.assertEqual(manifest.ToDict(), {}) |
254 | 254 | ||
255 | def test_toxml_omit_local(self): | ||
256 | """Does not include local_manifests projects when omit_local=True.""" | ||
257 | manifest = self.getXmlManifest( | ||
258 | '<?xml version="1.0" encoding="UTF-8"?><manifest>' | ||
259 | '<remote name="a" fetch=".."/><default remote="a" revision="r"/>' | ||
260 | '<project name="p" groups="local::me"/>' | ||
261 | '<project name="q"/>' | ||
262 | '<project name="r" groups="keep"/>' | ||
263 | '</manifest>') | ||
264 | self.assertEqual( | ||
265 | manifest.ToXml(omit_local=True).toxml(), | ||
266 | '<?xml version="1.0" ?><manifest>' | ||
267 | '<remote name="a" fetch=".."/><default remote="a" revision="r"/>' | ||
268 | '<project name="q"/><project name="r" groups="keep"/></manifest>') | ||
269 | |||
270 | def test_toxml_with_local(self): | ||
271 | """Does include local_manifests projects when omit_local=False.""" | ||
272 | manifest = self.getXmlManifest( | ||
273 | '<?xml version="1.0" encoding="UTF-8"?><manifest>' | ||
274 | '<remote name="a" fetch=".."/><default remote="a" revision="r"/>' | ||
275 | '<project name="p" groups="local::me"/>' | ||
276 | '<project name="q"/>' | ||
277 | '<project name="r" groups="keep"/>' | ||
278 | '</manifest>') | ||
279 | self.assertEqual( | ||
280 | manifest.ToXml(omit_local=False).toxml(), | ||
281 | '<?xml version="1.0" ?><manifest>' | ||
282 | '<remote name="a" fetch=".."/><default remote="a" revision="r"/>' | ||
283 | '<project name="p" groups="local::me"/>' | ||
284 | '<project name="q"/><project name="r" groups="keep"/></manifest>') | ||
285 | |||
255 | def test_repo_hooks(self): | 286 | def test_repo_hooks(self): |
256 | """Check repo-hooks settings.""" | 287 | """Check repo-hooks settings.""" |
257 | manifest = self.getXmlManifest(""" | 288 | manifest = self.getXmlManifest(""" |