summaryrefslogtreecommitdiffstats
path: root/tests/test_manifest_xml.py
diff options
context:
space:
mode:
authorLaMont Jones <lamontjones@google.com>2022-04-07 18:14:46 +0000
committerLaMont Jones <lamontjones@google.com>2022-04-12 15:46:23 +0000
commitd56e2eb4216827284220fcc35af42e60b4faaea6 (patch)
tree886d25de764ce3abe6978b639d1a715e2e7b6277 /tests/test_manifest_xml.py
parentd52ca421d52c75837d1614ec54549569f354b7ec (diff)
downloadgit-repo-d56e2eb4216827284220fcc35af42e60b4faaea6.tar.gz
manifest_xml: use Superproject to hold XML contentv2.23
Always create Superproject when there is a <superproject> tag, and have it hold the XML content, similar to how other manifest elements are handled. This also adds SetQuiet and SetPrintMessages to Superproject consistent with manifest.SetUseLocalManifests. Change-Id: I522bf3da542006575799f0640c67f7052704f266 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/334641 Reviewed-by: Mike Frysinger <vapier@google.com> Reviewed-by: Raman Tenneti <rtenneti@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
Diffstat (limited to 'tests/test_manifest_xml.py')
-rw-r--r--tests/test_manifest_xml.py50
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py
index cb3eb855..ede41547 100644
--- a/tests/test_manifest_xml.py
+++ b/tests/test_manifest_xml.py
@@ -289,8 +289,8 @@ class XmlManifestTests(ManifestParseTestCase):
289 <x-custom-tag>X tags are always ignored</x-custom-tag> 289 <x-custom-tag>X tags are always ignored</x-custom-tag>
290</manifest> 290</manifest>
291""") 291""")
292 self.assertEqual(manifest.superproject['name'], 'superproject') 292 self.assertEqual(manifest.superproject.name, 'superproject')
293 self.assertEqual(manifest.superproject['remote'].name, 'test-remote') 293 self.assertEqual(manifest.superproject.remote.name, 'test-remote')
294 self.assertEqual( 294 self.assertEqual(
295 sort_attributes(manifest.ToXml().toxml()), 295 sort_attributes(manifest.ToXml().toxml()),
296 '<?xml version="1.0" ?><manifest>' 296 '<?xml version="1.0" ?><manifest>'
@@ -569,10 +569,10 @@ class SuperProjectElementTests(ManifestParseTestCase):
569 <superproject name="superproject"/> 569 <superproject name="superproject"/>
570</manifest> 570</manifest>
571""") 571""")
572 self.assertEqual(manifest.superproject['name'], 'superproject') 572 self.assertEqual(manifest.superproject.name, 'superproject')
573 self.assertEqual(manifest.superproject['remote'].name, 'test-remote') 573 self.assertEqual(manifest.superproject.remote.name, 'test-remote')
574 self.assertEqual(manifest.superproject['remote'].url, 'http://localhost/superproject') 574 self.assertEqual(manifest.superproject.remote.url, 'http://localhost/superproject')
575 self.assertEqual(manifest.superproject['revision'], 'refs/heads/main') 575 self.assertEqual(manifest.superproject.revision, 'refs/heads/main')
576 self.assertEqual( 576 self.assertEqual(
577 sort_attributes(manifest.ToXml().toxml()), 577 sort_attributes(manifest.ToXml().toxml()),
578 '<?xml version="1.0" ?><manifest>' 578 '<?xml version="1.0" ?><manifest>'
@@ -591,10 +591,10 @@ class SuperProjectElementTests(ManifestParseTestCase):
591 <superproject name="superproject" revision="refs/heads/stable" /> 591 <superproject name="superproject" revision="refs/heads/stable" />
592</manifest> 592</manifest>
593""") 593""")
594 self.assertEqual(manifest.superproject['name'], 'superproject') 594 self.assertEqual(manifest.superproject.name, 'superproject')
595 self.assertEqual(manifest.superproject['remote'].name, 'test-remote') 595 self.assertEqual(manifest.superproject.remote.name, 'test-remote')
596 self.assertEqual(manifest.superproject['remote'].url, 'http://localhost/superproject') 596 self.assertEqual(manifest.superproject.remote.url, 'http://localhost/superproject')
597 self.assertEqual(manifest.superproject['revision'], 'refs/heads/stable') 597 self.assertEqual(manifest.superproject.revision, 'refs/heads/stable')
598 self.assertEqual( 598 self.assertEqual(
599 sort_attributes(manifest.ToXml().toxml()), 599 sort_attributes(manifest.ToXml().toxml()),
600 '<?xml version="1.0" ?><manifest>' 600 '<?xml version="1.0" ?><manifest>'
@@ -613,10 +613,10 @@ class SuperProjectElementTests(ManifestParseTestCase):
613 <superproject name="superproject" revision="refs/heads/stable" /> 613 <superproject name="superproject" revision="refs/heads/stable" />
614</manifest> 614</manifest>
615""") 615""")
616 self.assertEqual(manifest.superproject['name'], 'superproject') 616 self.assertEqual(manifest.superproject.name, 'superproject')
617 self.assertEqual(manifest.superproject['remote'].name, 'test-remote') 617 self.assertEqual(manifest.superproject.remote.name, 'test-remote')
618 self.assertEqual(manifest.superproject['remote'].url, 'http://localhost/superproject') 618 self.assertEqual(manifest.superproject.remote.url, 'http://localhost/superproject')
619 self.assertEqual(manifest.superproject['revision'], 'refs/heads/stable') 619 self.assertEqual(manifest.superproject.revision, 'refs/heads/stable')
620 self.assertEqual( 620 self.assertEqual(
621 sort_attributes(manifest.ToXml().toxml()), 621 sort_attributes(manifest.ToXml().toxml()),
622 '<?xml version="1.0" ?><manifest>' 622 '<?xml version="1.0" ?><manifest>'
@@ -635,10 +635,10 @@ class SuperProjectElementTests(ManifestParseTestCase):
635 <superproject name="superproject" revision="refs/heads/stable" /> 635 <superproject name="superproject" revision="refs/heads/stable" />
636</manifest> 636</manifest>
637""") 637""")
638 self.assertEqual(manifest.superproject['name'], 'superproject') 638 self.assertEqual(manifest.superproject.name, 'superproject')
639 self.assertEqual(manifest.superproject['remote'].name, 'test-remote') 639 self.assertEqual(manifest.superproject.remote.name, 'test-remote')
640 self.assertEqual(manifest.superproject['remote'].url, 'http://localhost/superproject') 640 self.assertEqual(manifest.superproject.remote.url, 'http://localhost/superproject')
641 self.assertEqual(manifest.superproject['revision'], 'refs/heads/stable') 641 self.assertEqual(manifest.superproject.revision, 'refs/heads/stable')
642 self.assertEqual( 642 self.assertEqual(
643 sort_attributes(manifest.ToXml().toxml()), 643 sort_attributes(manifest.ToXml().toxml()),
644 '<?xml version="1.0" ?><manifest>' 644 '<?xml version="1.0" ?><manifest>'
@@ -657,10 +657,10 @@ class SuperProjectElementTests(ManifestParseTestCase):
657 <superproject name="platform/superproject" remote="superproject-remote"/> 657 <superproject name="platform/superproject" remote="superproject-remote"/>
658</manifest> 658</manifest>
659""") 659""")
660 self.assertEqual(manifest.superproject['name'], 'platform/superproject') 660 self.assertEqual(manifest.superproject.name, 'platform/superproject')
661 self.assertEqual(manifest.superproject['remote'].name, 'superproject-remote') 661 self.assertEqual(manifest.superproject.remote.name, 'superproject-remote')
662 self.assertEqual(manifest.superproject['remote'].url, 'http://localhost/platform/superproject') 662 self.assertEqual(manifest.superproject.remote.url, 'http://localhost/platform/superproject')
663 self.assertEqual(manifest.superproject['revision'], 'refs/heads/main') 663 self.assertEqual(manifest.superproject.revision, 'refs/heads/main')
664 self.assertEqual( 664 self.assertEqual(
665 sort_attributes(manifest.ToXml().toxml()), 665 sort_attributes(manifest.ToXml().toxml()),
666 '<?xml version="1.0" ?><manifest>' 666 '<?xml version="1.0" ?><manifest>'
@@ -679,9 +679,9 @@ class SuperProjectElementTests(ManifestParseTestCase):
679 <superproject name="superproject" remote="default-remote"/> 679 <superproject name="superproject" remote="default-remote"/>
680</manifest> 680</manifest>
681""") 681""")
682 self.assertEqual(manifest.superproject['name'], 'superproject') 682 self.assertEqual(manifest.superproject.name, 'superproject')
683 self.assertEqual(manifest.superproject['remote'].name, 'default-remote') 683 self.assertEqual(manifest.superproject.remote.name, 'default-remote')
684 self.assertEqual(manifest.superproject['revision'], 'refs/heads/main') 684 self.assertEqual(manifest.superproject.revision, 'refs/heads/main')
685 self.assertEqual( 685 self.assertEqual(
686 sort_attributes(manifest.ToXml().toxml()), 686 sort_attributes(manifest.ToXml().toxml()),
687 '<?xml version="1.0" ?><manifest>' 687 '<?xml version="1.0" ?><manifest>'