Make merge_target_files more lenient, needed for cross-release merging.
These changes were necessary to begin merging a new cross-release target whose vendor half is frozen. - MergeDynamicPartitionInfoDicts - Filters combined fields to remove duplicates - Merges `super_block_devices` as well as other keys that were not previously used by other targets consuming this tool. - Introduces --allow-duplicate-apkapex-keys. This gives a warning rather than fatal error on duplicate apk/apex keys. This flag is needed for targets that cannot update a frozen half. - (Formats merge_target_files.py) Bug: 170683837 Test: Use merge_target_files to merge an S+R build, and boot. Change-Id: Id5f787e730de8f8ef697e1f2f29ac6514221e58d
This commit is contained in:
@@ -1418,13 +1418,17 @@ class CommonUtilsTest(test_utils.ReleaseToolsTestCase):
|
||||
|
||||
def test_MergeDynamicPartitionInfoDicts_ReturnsMergedDict(self):
|
||||
framework_dict = {
|
||||
'use_dynamic_partitions': 'true',
|
||||
'super_partition_groups': 'group_a',
|
||||
'dynamic_partition_list': 'system',
|
||||
'super_group_a_partition_list': 'system',
|
||||
}
|
||||
vendor_dict = {
|
||||
'use_dynamic_partitions': 'true',
|
||||
'super_partition_groups': 'group_a group_b',
|
||||
'dynamic_partition_list': 'vendor product',
|
||||
'super_block_devices': 'super',
|
||||
'super_super_device_size': '3000',
|
||||
'super_group_a_partition_list': 'vendor',
|
||||
'super_group_a_group_size': '1000',
|
||||
'super_group_b_partition_list': 'product',
|
||||
@@ -1434,8 +1438,11 @@ class CommonUtilsTest(test_utils.ReleaseToolsTestCase):
|
||||
framework_dict=framework_dict,
|
||||
vendor_dict=vendor_dict)
|
||||
expected_merged_dict = {
|
||||
'use_dynamic_partitions': 'true',
|
||||
'super_partition_groups': 'group_a group_b',
|
||||
'dynamic_partition_list': 'system vendor product',
|
||||
'dynamic_partition_list': 'product system vendor',
|
||||
'super_block_devices': 'super',
|
||||
'super_super_device_size': '3000',
|
||||
'super_group_a_partition_list': 'system vendor',
|
||||
'super_group_a_group_size': '1000',
|
||||
'super_group_b_partition_list': 'product',
|
||||
@@ -1445,12 +1452,14 @@ class CommonUtilsTest(test_utils.ReleaseToolsTestCase):
|
||||
|
||||
def test_MergeDynamicPartitionInfoDicts_IgnoringFrameworkGroupSize(self):
|
||||
framework_dict = {
|
||||
'use_dynamic_partitions': 'true',
|
||||
'super_partition_groups': 'group_a',
|
||||
'dynamic_partition_list': 'system',
|
||||
'super_group_a_partition_list': 'system',
|
||||
'super_group_a_group_size': '5000',
|
||||
}
|
||||
vendor_dict = {
|
||||
'use_dynamic_partitions': 'true',
|
||||
'super_partition_groups': 'group_a group_b',
|
||||
'dynamic_partition_list': 'vendor product',
|
||||
'super_group_a_partition_list': 'vendor',
|
||||
@@ -1462,8 +1471,9 @@ class CommonUtilsTest(test_utils.ReleaseToolsTestCase):
|
||||
framework_dict=framework_dict,
|
||||
vendor_dict=vendor_dict)
|
||||
expected_merged_dict = {
|
||||
'use_dynamic_partitions': 'true',
|
||||
'super_partition_groups': 'group_a group_b',
|
||||
'dynamic_partition_list': 'system vendor product',
|
||||
'dynamic_partition_list': 'product system vendor',
|
||||
'super_group_a_partition_list': 'system vendor',
|
||||
'super_group_a_group_size': '1000',
|
||||
'super_group_b_partition_list': 'product',
|
||||
|
Reference in New Issue
Block a user