/build/soong/scripts/ |
D | manifest_fixer_test.py | 32 def test_sdk(self): argument 34 self.assertTrue(manifest_fixer.compare_version_gt('28', '27')) 35 self.assertFalse(manifest_fixer.compare_version_gt('27', '28')) 36 self.assertFalse(manifest_fixer.compare_version_gt('28', '28')) 38 def test_codename(self): argument 40 self.assertTrue(manifest_fixer.compare_version_gt('Q', 'P')) 41 self.assertFalse(manifest_fixer.compare_version_gt('P', 'Q')) 42 self.assertFalse(manifest_fixer.compare_version_gt('Q', 'Q')) 44 def test_sdk_codename(self): argument 46 self.assertTrue(manifest_fixer.compare_version_gt('Q', '28')) [all …]
|
D | manifest_check_test.py | 47 …def run_test(self, xml, apk, uses_libraries=[], optional_uses_libraries=[]): #pylint: disable=dang… argument 75 def test_uses_library(self): argument 76 xml = self.xml_tmpl % (uses_library_xml('foo')) 77 apk = self.apk_tmpl % (uses_library_apk('foo')) 78 matches = self.run_test(xml, apk, uses_libraries=['foo']) 79 self.assertTrue(matches) 81 def test_uses_library_required(self): argument 82 xml = self.xml_tmpl % (uses_library_xml('foo', required_xml(True))) 83 apk = self.apk_tmpl % (uses_library_apk('foo', required_apk(True))) 84 matches = self.run_test(xml, apk, uses_libraries=['foo']) [all …]
|
/build/make/tools/releasetools/ |
D | images.py | 24 def RangeSha1(self, ranges): argument 27 def ReadRangeSet(self, ranges): argument 30 def TotalSha1(self, include_clobbered_blocks=False): argument 33 def WriteRangeDataToFd(self, ranges, fd): argument 40 def __init__(self): argument 41 self.blocksize = 4096 42 self.care_map = RangeSet() 43 self.clobbered_blocks = RangeSet() 44 self.extended = RangeSet() 45 self.total_blocks = 0 [all …]
|
D | test_rangelib.py | 23 def test_union(self): argument 24 self.assertEqual(RangeSet("10-19 30-34").union(RangeSet("18-29")), 26 self.assertEqual(RangeSet("10-19 30-34").union(RangeSet("22 32")), 29 def test_intersect(self): argument 30 self.assertEqual(RangeSet("10-19 30-34").intersect(RangeSet("18-32")), 32 self.assertEqual(RangeSet("10-19 30-34").intersect(RangeSet("22-28")), 35 def test_subtract(self): argument 36 self.assertEqual(RangeSet("10-19 30-34").subtract(RangeSet("18-32")), 38 self.assertEqual(RangeSet("10-19 30-34").subtract(RangeSet("22-28")), 41 def test_overlaps(self): argument [all …]
|
D | test_check_partition_sizes.py | 22 def setUp(self): argument 23 self.info_dict = common.LoadDictionaryFromLines(""" 39 def test_ab(self): argument 40 CheckPartitionSizes(self.info_dict) 42 def test_non_ab(self): argument 43 self.info_dict.update(common.LoadDictionaryFromLines(""" 48 CheckPartitionSizes(self.info_dict) 50 def test_non_dap(self): argument 51 self.info_dict.update(common.LoadDictionaryFromLines(""" 54 with self.assertRaises(RuntimeError): [all …]
|
D | test_apex_utils.py | 33 def setUp(self): argument 34 self.testdata_dir = test_utils.get_testdata_dir() 36 self.payload_key = os.path.join(self.testdata_dir, 'testkey.key') 37 self.apex_with_apk = os.path.join(self.testdata_dir, 'has_apk.apex') 49 def test_ParseApexPayloadInfo(self): argument 50 payload_file = self._GetTestPayload() 52 'avbtool', payload_file, self.payload_key, 'testkey', 'SHA256_RSA2048', 53 self.SALT, 'sha256', no_hashtree=True) 55 self.assertEqual('SHA256_RSA2048', payload_info['Algorithm']) 56 self.assertEqual(self.SALT, payload_info['Salt']) [all …]
|
D | test_ota_from_target_files.py | 92 def test_NoneDict(self): argument 93 self.assertIsNone(_LoadOemDicts(None)) 95 def test_SingleDict(self): argument 101 self.assertEqual(1, len(oem_dicts)) 102 self.assertEqual('foo', oem_dicts[0]['xyz']) 103 self.assertEqual('bar', oem_dicts[0]['a.b.c']) 105 def test_MultipleDicts(self): argument 115 self.assertEqual(3, len(oem_dicts)) 117 self.assertEqual('2', oem_dict['def']) 118 self.assertEqual('foo', oem_dict['xyz']) [all …]
|
D | test_verity_utils.py | 39 def setUp(self): argument 40 self.testdata_dir = get_testdata_dir() 42 self.partition_size = 1024 * 1024 43 self.prop_dict = { 47 'system_size': self.partition_size 50 self.hash_algorithm = "sha256" 51 self.fixed_salt = ( 53 self.expected_root_hash = ( 56 def _CreateSimg(self, raw_data): # pylint: disable=no-self-use argument 66 def _GenerateImage(self): argument [all …]
|
D | test_common.py | 188 def test_init(self): argument 189 target_info = common.BuildInfo(self.TEST_INFO_DICT, None) 190 self.assertEqual('product-device', target_info.device) 191 self.assertEqual('build-fingerprint', target_info.fingerprint) 192 self.assertFalse(target_info.is_ab) 193 self.assertIsNone(target_info.oem_props) 195 def test_init_with_oem_props(self): argument 196 target_info = common.BuildInfo(self.TEST_INFO_DICT_USES_OEM_PROPS, 197 self.TEST_OEM_DICTS) 198 self.assertEqual('device1', target_info.device) [all …]
|
D | edify_generator.py | 23 def __init__(self, version, info, fstab=None): argument 24 self.script = [] 25 self.mounts = set() 26 self._required_cache = 0 27 self.version = version 28 self.info = info 30 self.fstab = self.info.get("fstab", None) 32 self.fstab = fstab 35 def required_cache(self): argument 37 return self._required_cache [all …]
|
D | test_blockimgdiff.py | 30 def __init__(self, score): argument 31 self.score = score 33 def test_init(self): argument 34 item1 = HeapItem(self.Item(15)) 35 item2 = HeapItem(self.Item(20)) 36 item3 = HeapItem(self.Item(15)) 37 self.assertTrue(item1) 38 self.assertTrue(item2) 39 self.assertTrue(item3) 41 self.assertNotEqual(item1, item2) [all …]
|
D | verity_utils.py | 48 def __init__(self, message): argument 49 Exception.__init__(self, message) 231 def CalculateMaxImageSize(self, partition_size): argument 235 def CalculateDynamicPartitionSize(self, image_size): argument 239 def PadSparseImage(self, out_file): argument 243 def Build(self, out_file): argument 251 def __init__(self, partition_size, block_dev, fec_supported, signer_path, argument 253 self.version = 1 254 self.partition_size = partition_size 255 self.block_device = block_dev [all …]
|
D | test_sign_target_files_apks.py | 47 def setUp(self): argument 48 self.testdata_dir = test_utils.get_testdata_dir() 50 def test_EditTags(self): argument 51 self.assertEqual(EditTags('dev-keys'), ('release-keys')) 52 self.assertEqual(EditTags('test-keys'), ('release-keys')) 55 self.assertEqual(EditTags('abc,dev-keys,xyz'), ('abc,release-keys,xyz')) 58 self.assertEqual(EditTags('xyz,abc,dev-keys,xyz'), ('abc,release-keys,xyz')) 60 def test_RewriteAvbProps(self): argument 98 self.assertDictEqual(expected_dict, misc_info) 100 def test_RewriteProps(self): argument [all …]
|
D | rangelib.py | 33 def __init__(self, data=None): argument 34 self.monotonic = False 35 self._extra = {} 37 self._parse_internal(data) 40 self.data = tuple(self._remove_pairs(data)) 41 self.monotonic = all(x < y for x, y in zip(self.data, self.data[1:])) 43 self.data = () 45 def __iter__(self): argument 46 for i in range(0, len(self.data), 2): 47 yield self.data[i:i+2] [all …]
|
D | test_non_ab_ota.py | 29 def setUp(self): argument 31 def test_init(self): argument 33 self.assertEqual('ota-property-files', property_files.name) 34 self.assertEqual((), property_files.required) 35 self.assertEqual((), property_files.optional) 37 def test_Compute(self): argument 39 zip_file = self.construct_zip_package(entries) 44 tokens = self._parse_property_files_string(property_files_string) 45 self.assertEqual(2, len(tokens)) 46 self._verify_entries(zip_file, tokens, entries) [all …]
|
/build/make/tools/ |
D | test_post_process_props.py | 25 def test_createFromLine(self): argument 27 self.assertTrue(p.is_comment()) 28 self.assertEqual("", p.name) 29 self.assertEqual("", p.value) 30 self.assertFalse(p.is_optional()) 31 self.assertEqual("# this is comment", str(p)) 35 self.assertFalse(p.is_comment()) 36 self.assertEqual("a", p.name) 37 self.assertEqual("b", p.value) 38 self.assertFalse(p.is_optional()) [all …]
|
D | fat16copy.py | 81 def seek(self, amount, direction=0): argument 84 self.idx += amount 86 self.idx = self.size - amount 88 self.idx = amount 90 if self.idx < 0: 91 self.idx = 0 92 if self.idx > self.size: 93 self.idx = self.size 102 def __init__(self, fs, cluster, size=None): argument 109 self.fs = fs [all …]
|
/build/soong/scripts/hiddenapi/ |
D | signature_trie_test.py | 34 def test_nested_inner_classes(self): argument 44 self.assertEqual(elements, self.signature_to_elements(signature)) 45 self.assertEqual(signature, "L" + self.elements_to_signature(elements)) 47 def test_basic_member(self): argument 55 self.assertEqual(elements, self.signature_to_elements(signature)) 56 self.assertEqual(signature, "L" + self.elements_to_signature(elements)) 58 def test_double_dollar_class(self): argument 69 self.assertEqual(elements, self.signature_to_elements(signature)) 70 self.assertEqual(signature, "L" + self.elements_to_signature(elements)) 72 def test_no_member(self): argument [all …]
|
D | verify_overlaps_test.py | 51 def test_extract_subset_signature(self): argument 52 monolithic = self.read_flag_trie_from_string( 57 subset = self.extract_subset_from_monolithic_flags_as_dict_from_string( 65 self.assertEqual(expected, subset) 67 def test_extract_subset_class(self): argument 68 monolithic = self.read_flag_trie_from_string( 73 subset = self.extract_subset_from_monolithic_flags_as_dict_from_string( 85 self.assertEqual(expected, subset) 87 def test_extract_subset_outer_class(self): argument 88 monolithic = self.read_flag_trie_from_string( [all …]
|
D | signature_patterns_test.py | 41 def test_generate_unmatched(self): argument 42 _, errors = self.produce_patterns_from_string( 44 self.assertEqual([ 51 def test_generate_default(self): argument 52 patterns, errors = self.produce_patterns_from_string( 54 self.assertEqual([], errors) 59 self.assertEqual(expected, patterns) 61 def test_generate_split_package(self): argument 62 patterns, errors = self.produce_patterns_from_string( 64 self.assertEqual([], errors) [all …]
|
/build/pesto/experiments/prepare_bazel_test_env/ |
D | bazelenv.py | 52 def __init__(self, soong_workspace: pathlib.Path): argument 53 self.soong_workspace = soong_workspace 55 self.soong_executable = self.soong_workspace.joinpath( 57 if not self.soong_executable.exists(): 60 self.soong_executable) 62 def build(self, build_targets: Set[str]) -> None: argument 73 str(self.soong_executable), "--build-mode", "--all-modules", 84 cwd=self.soong_workspace, 113 def build_targets(self) -> set: argument 117 def stage(self, _): argument [all …]
|
/build/soong/cc/symbolfile/ |
D | test_symbolfile.py | 28 def test_decode_api_level(self) -> None: argument 29 self.assertEqual(9, symbolfile.decode_api_level('9', {})) 30 self.assertEqual(9000, symbolfile.decode_api_level('O', {'O': 9000})) 32 with self.assertRaises(KeyError): 37 def test_get_tags_no_tags(self) -> None: argument 38 self.assertEqual(Tags(), symbolfile.get_tags('', {})) 39 self.assertEqual(Tags(), symbolfile.get_tags('foo bar baz', {})) 41 def test_get_tags(self) -> None: argument 42 self.assertEqual(Tags.from_strs(['foo', 'bar']), 44 self.assertEqual(Tags.from_strs(['bar', 'baz']), [all …]
|
/build/make/tools/fs_config/ |
D | fs_config_generator.py | 42 def __init__(self, gen): argument 51 self._gen = gen 58 def __call__(self, cls): argument 60 generator._generators[self._gen] = cls() 143 def __init__(self, identifier, value, found, login_shell): argument 156 self.identifier = identifier 157 self.value = value 158 self.found = found 159 self.login_shell = login_shell 162 self.normalized_value = str(int(value, 0)) [all …]
|
D | test_fs_config_generator.py | 22 def test_is_overlap(self): argument 25 self.assertTrue(AIDHeaderParser._is_overlap((0, 1), (1, 2))) 27 self.assertTrue(AIDHeaderParser._is_overlap((0, 100), (90, 200))) 29 self.assertTrue(AIDHeaderParser._is_overlap((20, 50), (1, 101))) 31 self.assertFalse(AIDHeaderParser._is_overlap((0, 100), (101, 200))) 33 self.assertFalse(AIDHeaderParser._is_overlap((-10, 0), (10, 20))) 35 def test_in_any_range(self): argument 38 self.assertFalse(Utils.in_any_range(50, [(100, 200), (1, 2), (1, 1)])) 39 self.assertFalse(Utils.in_any_range(250, [(100, 200), (1, 2), (1, 1)])) 41 self.assertTrue(Utils.in_any_range(100, [(100, 200), (1, 2), (1, 1)])) [all …]
|
/build/make/orchestrator/core/ |
D | test_lunch.py | 25 def test_find_dirs(self): argument 26 self.assertEqual([x for x in lunch.FindDirs("test/configs", "multitree_combos")], [ 31 def test_find_file(self): argument 34 self.assertEqual(lunch.FindFile("test/configs", "v.mcombo"), 37 def test_find_config_dirs(self): argument 38 self.assertEqual([x for x in lunch.FindConfigDirs("test/configs")], [ 43 def test_find_named_config(self): argument 45 self.assertEqual(lunch.FindNamedConfig("test/configs", "b"), 49 self.assertEqual(lunch.FindNamedConfig("test/configs", "nested"), 53 self.assertEqual(lunch.FindNamedConfig("test/configs", "v"), [all …]
|