diff options
Diffstat (limited to 'tests/test_git_superproject.py')
-rw-r--r-- | tests/test_git_superproject.py | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/tests/test_git_superproject.py b/tests/test_git_superproject.py index 5c1455f5..b1ae3576 100644 --- a/tests/test_git_superproject.py +++ b/tests/test_git_superproject.py | |||
@@ -23,6 +23,7 @@ from unittest import mock | |||
23 | import git_superproject | 23 | import git_superproject |
24 | import manifest_xml | 24 | import manifest_xml |
25 | import platform_utils | 25 | import platform_utils |
26 | from test_manifest_xml import sort_attributes | ||
26 | 27 | ||
27 | 28 | ||
28 | class SuperprojectTestCase(unittest.TestCase): | 29 | class SuperprojectTestCase(unittest.TestCase): |
@@ -140,12 +141,12 @@ class SuperprojectTestCase(unittest.TestCase): | |||
140 | with open(manifest_path, 'r') as fp: | 141 | with open(manifest_path, 'r') as fp: |
141 | manifest_xml = fp.read() | 142 | manifest_xml = fp.read() |
142 | self.assertEqual( | 143 | self.assertEqual( |
143 | manifest_xml, | 144 | sort_attributes(manifest_xml), |
144 | '<?xml version="1.0" ?><manifest>' | 145 | '<?xml version="1.0" ?><manifest>' |
145 | '<remote name="default-remote" fetch="http://localhost"/>' | 146 | '<remote fetch="http://localhost" name="default-remote"/>' |
146 | '<default remote="default-remote" revision="refs/heads/main"/>' | 147 | '<default remote="default-remote" revision="refs/heads/main"/>' |
147 | '<project name="platform/art" path="art" revision="ABCDEF" ' | 148 | '<project groups="notdefault,platform-' + self.platform + '" ' |
148 | 'groups="notdefault,platform-' + self.platform + '"/>' | 149 | 'name="platform/art" path="art" revision="ABCDEF"/>' |
149 | '<superproject name="superproject"/>' | 150 | '<superproject name="superproject"/>' |
150 | '</manifest>') | 151 | '</manifest>') |
151 | 152 | ||
@@ -167,13 +168,13 @@ class SuperprojectTestCase(unittest.TestCase): | |||
167 | with open(manifest_path, 'r') as fp: | 168 | with open(manifest_path, 'r') as fp: |
168 | manifest_xml = fp.read() | 169 | manifest_xml = fp.read() |
169 | self.assertEqual( | 170 | self.assertEqual( |
170 | manifest_xml, | 171 | sort_attributes(manifest_xml), |
171 | '<?xml version="1.0" ?><manifest>' | 172 | '<?xml version="1.0" ?><manifest>' |
172 | '<remote name="default-remote" fetch="http://localhost"/>' | 173 | '<remote fetch="http://localhost" name="default-remote"/>' |
173 | '<default remote="default-remote" revision="refs/heads/main"/>' | 174 | '<default remote="default-remote" revision="refs/heads/main"/>' |
174 | '<project name="platform/art" path="art" ' | 175 | '<project groups="notdefault,platform-' + self.platform + '" ' |
175 | 'revision="2c2724cb36cd5a9cec6c852c681efc3b7c6b86ea" ' | 176 | 'name="platform/art" path="art" ' |
176 | 'groups="notdefault,platform-' + self.platform + '"/>' | 177 | 'revision="2c2724cb36cd5a9cec6c852c681efc3b7c6b86ea"/>' |
177 | '<superproject name="superproject"/>' | 178 | '<superproject name="superproject"/>' |
178 | '</manifest>') | 179 | '</manifest>') |
179 | 180 | ||
@@ -208,16 +209,17 @@ class SuperprojectTestCase(unittest.TestCase): | |||
208 | with open(manifest_path, 'r') as fp: | 209 | with open(manifest_path, 'r') as fp: |
209 | manifest_xml = fp.read() | 210 | manifest_xml = fp.read() |
210 | self.assertEqual( | 211 | self.assertEqual( |
211 | manifest_xml, | 212 | sort_attributes(manifest_xml), |
212 | '<?xml version="1.0" ?><manifest>' | 213 | '<?xml version="1.0" ?><manifest>' |
213 | '<remote name="default-remote" fetch="http://localhost"/>' | 214 | '<remote fetch="http://localhost" name="default-remote"/>' |
214 | '<remote name="goog" fetch="http://localhost2"/>' | 215 | '<remote fetch="http://localhost2" name="goog"/>' |
215 | '<default remote="default-remote" revision="refs/heads/main"/>' | 216 | '<default remote="default-remote" revision="refs/heads/main"/>' |
216 | '<project name="platform/art" path="art" ' | 217 | '<project groups="notdefault,platform-' + self.platform + '" ' |
217 | 'revision="2c2724cb36cd5a9cec6c852c681efc3b7c6b86ea" ' | 218 | 'name="platform/art" path="art" ' |
218 | 'groups="notdefault,platform-' + self.platform + '"/>' | 219 | 'revision="2c2724cb36cd5a9cec6c852c681efc3b7c6b86ea"/>' |
219 | '<project name="platform/vendor/x" path="vendor/x" remote="goog" ' | 220 | '<project clone-depth="1" groups="vendor" ' |
220 | 'revision="master-with-vendor" groups="vendor" clone-depth="1"/>' | 221 | 'name="platform/vendor/x" path="vendor/x" remote="goog" ' |
222 | 'revision="master-with-vendor"/>' | ||
221 | '<superproject name="superproject"/>' | 223 | '<superproject name="superproject"/>' |
222 | '</manifest>') | 224 | '</manifest>') |
223 | 225 | ||