Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: scripts/common/archive_utils_unittest.py

Issue 2407183003: Revert of Enable saving the same file in multiple archives (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/common/archive_utils.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/common/archive_utils_unittest.py
diff --git a/scripts/common/archive_utils_unittest.py b/scripts/common/archive_utils_unittest.py
index 1d2aa048b7d9861b5f424fb3008f7e5386236bb4..1983063935d30bcf6edad6f30e29c48ead8ef663 100644
--- a/scripts/common/archive_utils_unittest.py
+++ b/scripts/common/archive_utils_unittest.py
@@ -109,26 +109,6 @@
'arch': ['64bit'],
'buildtype': ['dev'],
'archive': 'dev64_implied_direct_archive.txt',
- },
- {
- 'filename': 'archive_1.txt',
- 'buildtype': ['dev'],
- 'archive': 'archive_1.zip',
- },
- {
- 'filename': 'archive_2.txt',
- 'buildtype': ['dev'],
- 'archive': 'archive_2.zip',
- },
- {
- 'filename': 'multiple_archive.txt',
- 'buildtype': ['dev'],
- 'archive': 'archive_1.zip',
- },
- {
- 'filename': 'multiple_archive.txt',
- 'buildtype': ['dev'],
- 'archive': 'archive_2.zip',
},
]
@@ -351,17 +331,14 @@
self.assertEqual(len(files_list), 0)
def testParseArchiveLists(self):
- STATIC_ARCHIVE = 'static_archive.zip'
- ARCHIVE_1 = 'archive_1.zip'
- ARCHIVE_2 = 'archive_2.zip'
- ARCHIVENAMES = [STATIC_ARCHIVE, ARCHIVE_1, ARCHIVE_2]
+ ARCHIVENAME = 'static_archive.zip'
files_cfg = CreateTestFilesCfg(self.temp_dir)
arch = '64bit'
buildtype = 'official'
fparser = archive_utils.FilesCfgParser(files_cfg, buildtype, arch)
archives = fparser.ParseArchiveLists()
- self.assertEqual(archives.keys(), [STATIC_ARCHIVE])
- self.assertItemsEqual([x['filename'] for x in archives[STATIC_ARCHIVE]],
+ self.assertEqual(archives.keys(), [ARCHIVENAME])
+ self.assertEqual([x['filename'] for x in archives[ARCHIVENAME]],
['archive_allany.txt', 'subdirectory/archive_allany.txt'])
# 32bit dev has additional files under the same archive name.
@@ -369,14 +346,10 @@
buildtype = 'dev'
fparser = archive_utils.FilesCfgParser(files_cfg, buildtype, arch)
archives = fparser.ParseArchiveLists()
- self.assertEqual(archives.keys(), ARCHIVENAMES)
- self.assertItemsEqual([x['filename'] for x in archives[STATIC_ARCHIVE]],
+ self.assertEqual(archives.keys(), [ARCHIVENAME])
+ self.assertEqual([x['filename'] for x in archives[ARCHIVENAME]],
['archive_allany.txt', 'subdirectory/archive_allany.txt',
'subdirectory/archive_dev32.txt'])
- self.assertItemsEqual([x['filename'] for x in archives[ARCHIVE_1]],
- ['multiple_archive.txt', 'archive_1.txt'])
- self.assertItemsEqual([x['filename'] for x in archives[ARCHIVE_2]],
- ['multiple_archive.txt', 'archive_2.txt'])
def testOptionalFiles(self):
files_cfg = CreateTestFilesCfg(self.temp_dir)
@@ -385,8 +358,6 @@
buildtype = 'dev'
fparser = archive_utils.FilesCfgParser(files_cfg, buildtype, arch)
self.assertTrue(fparser.IsOptional(optional_fn))
- non_existent_fn = 'non_existent_fn.txt'
- self.assertFalse(fparser.IsOptional(non_existent_fn))
# It's only optional for 'dev' builds.
buildtype = 'official'
« no previous file with comments | « scripts/common/archive_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698