/development/vndk/tools/definition-tool/tests/ |
D | test_elf_link_data.py | 11 def setUp(self): argument 12 self.x = ELFLinkData(PT_SYSTEM, '/system/lib/libx.so', None, 0) 13 self.y = ELFLinkData(PT_SYSTEM, '/system/lib/liby.so', None, 0) 14 self.z = ELFLinkData(PT_SYSTEM, '/system/lib/libz.so', None, 0) 15 self.w = ELFLinkData(PT_SYSTEM, '/system/lib/libw.so', None, 0) 16 self.v = ELFLinkData(PT_VENDOR, '/vendor/lib/libv.so', None, 0) 18 self.x.add_needed_dep(self.y) 19 self.x.add_dlopen_dep(self.z) 21 self.z.add_needed_dep(self.w) 22 self.z.add_dlopen_dep(self.w) [all …]
|
D | test_tagged_dict.py | 54 def test_normalize_tag(self): argument 55 self.assertEqual('ll_ndk', TaggedDict._normalize_tag('ll-ndk')) 56 self.assertEqual('ll_ndk', TaggedDict._normalize_tag('LL-NDK')) 57 self.assertEqual('ll_ndk', TaggedDict._normalize_tag('LL_NDK')) 58 with self.assertRaises(ValueError): 62 def _check_tag_visibility(self, d, from_tag, visible_tags): argument 64 self.assertTrue(d.is_tag_visible(from_tag, to_tag)) 66 self.assertEqual(d.is_tag_visible(from_tag, to_tag), 70 def test_is_tag_visible(self): argument 75 self._check_tag_visibility(d, 'll_ndk', visible_tags) [all …]
|
D | test_elf.py | 14 def setUp(self): argument 15 self.sym_local = Elf_Sym(0, 0, 4, 0, 0, 1) 16 self.sym_global = Elf_Sym(0, 0, 4, 17, 0, 1) 17 self.sym_weak = Elf_Sym(0, 0, 4, 33, 0, 1) 18 self.sym_undef = Elf_Sym(0, 0, 4, 16, 0, 0) 21 def test_is_local(self): argument 22 self.assertTrue(self.sym_local.is_local) 23 self.assertFalse(self.sym_global.is_local) 24 self.assertFalse(self.sym_weak.is_local) 27 def test_is_global(self): argument [all …]
|
D | test_generic_refs.py | 16 def __init__(self, exported_symbols): argument 17 self.exported_symbols = exported_symbols 22 def __init__(self, path, exported_symbols): argument 23 self.path = path 24 self.elf = MockELF(exported_symbols) 28 def setUp(self): argument 29 self.ref = GenericRefs() 30 self.ref.add('/system/lib/libc.so', 32 self.ref.add('/system/lib/libm.so', 34 self.ref.add('/system/lib64/libc.so', [all …]
|
D | test_vndk_lib_dir.py | 16 def test_create_vndk_dir_suffix(self): argument 17 self.assertEqual('', VNDKLibDir.create_vndk_dir_suffix('current')) 18 self.assertEqual('-28', VNDKLibDir.create_vndk_dir_suffix('28')) 21 def test_create_vndk_sp_dir_name(self): argument 22 self.assertEqual( 24 self.assertEqual( 28 def test_create_vndk_dir_name(self): argument 29 self.assertEqual( 31 self.assertEqual( 35 def test_extract_vndk_version_from_name(self): argument [all …]
|
/development/testrunner/test_defs/ |
D | test_suite.py | 27 def __init__(self): argument 28 self._name = None 29 self._build_path = None 30 self._build_dependencies = [] 31 self._is_continuous = False 32 self._suite = None 33 self._description = '' 34 self._extra_build_args = '' 35 self._is_full_make = False 36 self._is_granted_permissions = True [all …]
|
D | instrumentation_test.py | 36 def __init__(self): argument 37 test_suite.AbstractTestSuite.__init__(self) 38 self._package_name = None 39 self._runner_name = self.DEFAULT_RUNNER 40 self._class_name = None 41 self._target_name = None 42 self._java_package = None 44 def GetPackageName(self): argument 45 return self._package_name 47 def SetPackageName(self, package_name): argument [all …]
|
/development/scripts/ |
D | cargo2android.py | 161 def __init__(self, runner, outf_name): argument 163 self.runner = runner 164 self.debug = runner.args.debug 165 self.cargo_dir = '' # directory of my Cargo.toml 166 self.outf_name = outf_name # path to Android.bp 167 self.outf = None # open file handle of outf_name during dump* 169 self.host_supported = False 170 self.device_supported = False 171 self.has_warning = False 173 self.module_name = '' # unique in Android build system [all …]
|
D | native_heapdump_viewer_tests.py | 28 def CreateTmpFile(self, contents): argument 29 fd, self._tmp_file_name = tempfile.mkstemp() 32 return self._tmp_file_name 34 def tearDown(self): argument 35 if self._tmp_file_name: 37 os.unlink(self._tmp_file_name) 86 def test_version10_valid(self): argument 87 heap = self.CreateTmpFile(self._heap_num_field_valid_version10 + self._map_data) 88 self.assertTrue(native_heapdump_viewer.GetNumFieldValid(heap)) 90 def test_version10_invalid(self): argument [all …]
|
/development/tools/axl/ |
D | axl.py | 32 def __init__(self): argument 33 self.log = log.Log.getInstance() 35 def write(self, data): argument 36 self.log("BaseProtocol.write()", len(data), data) 37 return self.transport.write(data) 39 def dataReceived(self, data): argument 40 self.log("BaseProtocol.dataReceived()", len(data), data) 42 def connectionMade(self): argument 43 self.log("BaseProtocol.connectionMade()") 44 self.transport.setTcpNoDelay(1) # send immediately [all …]
|
/development/gsi/gsi_util/gsi_util/mounters/ |
D | base_mounter.py | 22 def __init__(self, filename, cleanup_func=None): argument 23 self._filename = filename 24 self._clean_up_func = cleanup_func 26 def _handle_get_filename(self): argument 27 return self._filename 29 def _handle_clean_up(self): argument 30 if self._clean_up_func: 31 self._clean_up_func() 33 def __enter__(self): argument 34 return self._handle_get_filename() [all …]
|
/development/vndk/tools/header-checker/tests/ |
D | test.py | 41 def setUp(self): argument 42 self.tmp_dir = None 44 def tearDown(self): argument 45 if self.tmp_dir: 46 self.tmp_dir.cleanup() 47 self.tmp_dir = None 49 def get_tmp_dir(self): argument 50 if not self.tmp_dir: 51 self.tmp_dir = tempfile.TemporaryDirectory() 52 return self.tmp_dir.name [all …]
|
/development/vndk/tools/sourcedr/blueprint/tests/ |
D | test_lexer.py | 46 def test_lexer_error(self): argument 50 self.assertEqual(exc.line, 1) 51 self.assertEqual(exc.column, 3) 52 self.assertEqual(exc.message, 'unexpected character') 53 self.assertEqual(str(exc), 'LexerError: 1:3: unexpected character') 56 self.assertEqual(exc.line, 3) 57 self.assertEqual(exc.column, 5) 58 self.assertEqual(exc.message, 'unexpected character') 59 self.assertEqual(str(exc), 'LexerError: 3:5: unexpected character') 62 def test_hierarchy(self): argument [all …]
|
D | test_ast.py | 33 def test_eval(self): argument 36 with self.assertRaises(NotImplementedError): 47 def test_bool(self): argument 51 self.assertFalse(bool(false_expr)) 52 self.assertFalse(false_expr.eval({})) 55 self.assertTrue(bool(true_expr)) 56 self.assertTrue(true_expr.eval({})) 58 self.assertEqual(Bool(False), false_expr) 59 self.assertEqual(Bool(True), true_expr) 62 def test_equal(self): argument [all …]
|
D | test_evaluate_default.py | 33 def test_evaluate_default(self): argument 41 self.assertEqual(len(result), 3) 42 self.assertEqual(result['a'], 'specified_a') 43 self.assertEqual(result['b'], 'specified_b') 44 self.assertEqual(result['c'], 'default_c') 47 def test_evaluate_default_nested(self): argument 55 self.assertEqual(len(result), 1) 56 self.assertEqual(len(result['c']), 2) 57 self.assertEqual(result['c']['a'], 'specified_a') 58 self.assertEqual(result['c']['b'], 'default_b') [all …]
|
/development/testrunner/tests/ |
D | am_instrument_parser_tests.py | 26 def testParseAmInstResult(self): argument 35 self.assertEquals(4871, bundle_dict['java_size']) 36 self.assertEquals(33846, bundle_dict['cpu_time']) 37 self.assertEquals("\nError: Failed to generate emma coverage.", 40 def testParseAmInstStatus(self): argument 78 self.assertEquals('testLaunchComplexActivity', map['test']) 79 self.assertEquals('LaunchPerformanceTest', map['class']) 80 self.assertEquals('1', map['current']) 81 self.assertEquals('2', map['numtests']) 82 self.assertEquals('InstrumentationTestRunner', map['id']) [all …]
|
/development/tools/logblame/ |
D | ps.py | 12 def __init__(self, uid, pid, ppid, name): argument 13 self.uid = uid 14 self.pid = pid 15 self.ppid = ppid 16 self.name = name 18 def DisplayName(self): argument 19 if self.name: 20 return self.name 21 if self.uid: 22 return self.uid.name [all …]
|
/development/vndk/tools/sourcedr/ninja/ |
D | ninja.py | 44 def __init__(self, *args, **kwargs): argument 45 super(EvalEnv, self).__init__(*args, **kwargs) 46 self.parent = None 49 def get_recursive(self, key, default=None): argument 51 return self[key] 53 if self.parent: 54 return self.parent.get_recursive(key, default) 62 def __init__(self, build_env, rule_env): argument 63 self._build_env = build_env 64 self._rule_env = rule_env [all …]
|
/development/testrunner/ |
D | make_tree.py | 27 def __init__(self, name, parent): argument 28 self._name = name 29 self._children_map = {} 30 self._is_leaf = False 31 self._parent = parent 32 self._includes_submake = None 34 self._path = os.path.join(parent._GetPath(), name) 36 self._path = "" 38 def _AddPath(self, path_segs): argument 46 return self [all …]
|
D | runtest.py | 83 def __init__(self): argument 85 self._root_path = android_build.GetTop() 90 self._re_make_install_path = re.compile(pattern) 92 self._adb = None 93 self._known_tests = None 94 self._options = None 95 self._test_args = None 96 self._tests_to_run = None 98 def _ProcessOptions(self): argument 102 self._TEST_FILE_NAME) [all …]
|
/development/testrunner/coverage/ |
D | coverage_target.py | 19 def __init__(self): argument 20 self._name = None 21 self._type = None 22 self._build_path = None 23 self._paths = [] 25 def GetName(self): argument 26 return self._name 28 def SetName(self, name): argument 29 self._name = name 31 def GetPaths(self): argument [all …]
|
/development/gsi/gsi_util/gsi_util/utils/tests/ |
D | cmd_utils_unittest.py | 31 def setUp(self): argument 33 log_entries = self._log_entries = [] 38 def handle(self, record): argument 41 self._handler = handlers.MemoryHandler(capacity=0, target=Target()) 42 logging.getLogger().addHandler(self._handler) 44 def tearDown(self): argument 46 logging.getLogger().removeHandler(self._handler) 48 def test_command_sequence(self): argument 50 self.assertEqual((0, None, None), result) 51 self.assertEqual(('INFO', "Executed command: 'echo 123' (ret: 0)"), [all …]
|
/development/python-packages/adb/ |
D | device.py | 29 def __init__(self, serial): argument 30 self.serial = serial 31 super(DeviceNotFoundError, self).__init__( 36 def __init__(self): argument 37 super(NoUniqueDeviceError, self).__init__('No unique device') 41 def __init__(self, cmd, stdout, stderr, exit_code): argument 42 super(ShellError, self).__init__( 44 self.cmd = cmd 45 self.stdout = stdout 46 self.stderr = stderr [all …]
|
/development/vndk/tools/sourcedr/ninja/tests/ |
D | test_ninja.py | 16 def __init__(self, *args, **kwargs): argument 17 super(MockedParser, self).__init__(*args, **kwargs) 18 self.mocked_env = [] 20 def _push_context(self, lexer, env): argument 21 super(MockedParser, self)._push_context(lexer, env) 22 self.mocked_env.append(env) 26 def test_empty(self): argument 28 self.assertFalse(s) 29 self.assertEqual('', ninja.eval_string(s, ninja.EvalEnv())) 31 def test_append_raw(self): argument [all …]
|
/development/vndk/tools/sourcedr/blueprint/ |
D | vndk.py | 30 def __init__(self, rule, attrs): argument 32 self.rule = rule 33 self._attrs = attrs 36 def get_property(self, *names, **kwargs): argument 39 result = self._attrs 47 def is_vndk(self): argument 49 return bool(self.get_property('vndk', 'enabled')) 52 def is_vndk_sp(self): argument 54 return bool(self.get_property('vndk', 'support_system_process')) 57 def is_vendor(self): argument [all …]
|