Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 102) sorted by relevance

12345

/development/vndk/tools/definition-tool/tests/
Dtest_elf_link_data.py15 def setUp(self): argument
16 self.x = ELFLinkData(PT_SYSTEM, '/system/lib/libx.so', None, 0)
17 self.y = ELFLinkData(PT_SYSTEM, '/system/lib/liby.so', None, 0)
18 self.z = ELFLinkData(PT_SYSTEM, '/system/lib/libz.so', None, 0)
19 self.w = ELFLinkData(PT_SYSTEM, '/system/lib/libw.so', None, 0)
20 self.v = ELFLinkData(PT_VENDOR, '/vendor/lib/libv.so', None, 0)
22 self.x.add_needed_dep(self.y)
23 self.x.add_dlopen_dep(self.z)
25 self.z.add_needed_dep(self.w)
26 self.z.add_dlopen_dep(self.w)
[all …]
Dtest_tagged_dict.py45 def test_normalize_tag(self): argument
46 self.assertEqual('ll_ndk', TaggedDict._normalize_tag('ll-ndk'))
47 self.assertEqual('ll_ndk', TaggedDict._normalize_tag('LL-NDK'))
48 self.assertEqual('ll_ndk', TaggedDict._normalize_tag('LL_NDK'))
49 with self.assertRaises(ValueError):
53 def _check_tag_visibility(self, d, from_tag, visible_tags): argument
55 self.assertEqual(d.is_tag_visible(from_tag, to_tag),
59 def test_is_tag_visible(self): argument
64 self._check_tag_visibility(d, 'll_ndk', visible_tags)
65 self._check_tag_visibility(d, 'll_ndk_indirect', visible_tags)
[all …]
Dtest_elf.py16 def setUp(self): argument
17 self.sym_local = Elf_Sym(0, 0, 4, 0, 0, 1)
18 self.sym_global = Elf_Sym(0, 0, 4, 17, 0, 1)
19 self.sym_weak = Elf_Sym(0, 0, 4, 33, 0, 1)
20 self.sym_undef = Elf_Sym(0, 0, 4, 16, 0, 0)
22 def test_is_local(self): argument
23 self.assertTrue(self.sym_local.is_local)
24 self.assertFalse(self.sym_global.is_local)
25 self.assertFalse(self.sym_weak.is_local)
27 def test_is_global(self): argument
[all …]
Dtest_generic_refs.py20 def __init__(self, exported_symbols): argument
21 self.exported_symbols = exported_symbols
25 def __init__(self, path, exported_symbols): argument
26 self.path = path
27 self.elf = MockELF(exported_symbols)
31 def setUp(self): argument
32 self.ref = GenericRefs()
33 self.ref.add('/system/lib/libc.so',
35 self.ref.add('/system/lib/libm.so',
37 self.ref.add('/system/lib64/libc.so',
[all …]
Dtest_vndk_lib_dir.py18 def test_create_vndk_dir_suffix(self): argument
19 self.assertEqual('', VNDKLibDir.create_vndk_dir_suffix('current'))
20 self.assertEqual('-28', VNDKLibDir.create_vndk_dir_suffix('28'))
23 def test_create_vndk_sp_dir_name(self): argument
24 self.assertEqual(
26 self.assertEqual(
30 def test_create_vndk_dir_name(self): argument
31 self.assertEqual(
33 self.assertEqual(
37 def test_extract_vndk_version_from_name(self): argument
[all …]
Dtest_elf_linker.py21 def _create_normal_graph(self): argument
51 def _get_paths_from_nodes(self, nodes): argument
55 def test_get_lib(self): argument
56 gb = self._create_normal_graph()
60 self.assertEqual(gb.libc_32, node)
61 self.assertEqual('/system/lib/libc.so', node.path)
64 self.assertEqual(gb.libdl_64, node)
65 self.assertEqual('/system/lib64/libdl.so', node.path)
68 self.assertEqual(gb.libEGL_64, node)
69 self.assertEqual('/vendor/lib64/libEGL.so', node.path)
[all …]
/development/testrunner/test_defs/
Dtest_suite.py27 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 …]
Dinstrumentation_test.py36 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/tools/axl/
Daxl.py32 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/
Dbase_mounter.py22 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/sourcedr/sourcedr/blueprint/tests/
Dtest_lexer.py46 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 …]
Dtest_ast.py33 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 …]
Dtest_evaluate_default.py33 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/vndk/tools/header-checker/tests/
Dtest.py28 def get_reference_dump_path(self, name, target_arch): argument
34 def run_and_compare(self, input_path, expected_path, cflags=[]): argument
38 self.assertEqual(actual_output, expected_output)
40 def run_and_compare_name(self, name, cflags=[]): argument
43 self.run_and_compare(input_path, expected_path, cflags)
45 def run_and_compare_name_cpp(self, name, cflags=[]): argument
46 self.run_and_compare_name(name, cflags + ['-x', 'c++', '-std=c++11'])
48 def run_and_compare_name_c_cpp(self, name, cflags=[]): argument
49 self.run_and_compare_name(name, cflags)
50 self.run_and_compare_name_cpp(name, cflags)
[all …]
/development/vndk/tools/sourcedr/sourcedr/
Dninja.py47 def __init__(self, *args, **kwargs): argument
48 super(EvalEnv, self).__init__(*args, **kwargs)
49 self.parent = None
52 def get_recursive(self, key, default=None): argument
54 return self[key]
56 if self.parent:
57 return self.parent.get_recursive(key, default)
65 def __init__(self, build_env, rule_env): argument
66 self._build_env = build_env
67 self._rule_env = rule_env
[all …]
/development/testrunner/tests/
Dam_instrument_parser_tests.py26 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/
Dps.py12 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/testrunner/
Dmake_tree.py27 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 …]
Druntest.py83 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/
Dcoverage_target.py19 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/
Dcmd_utils_unittest.py31 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/
Ddevice.py29 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/sourcedr/tests/
Dtest_map.py22 def test_load_build_dep_file(self): argument
23 dep = load_build_dep_file_from_path(self.DEP_PATH)
25 self.assertIn('liba.so', dep)
26 self.assertIn('libb.so', dep)
27 self.assertIn('libc.so', dep)
29 self.assertSetEqual({'a.h', 'a1.c', 'a1.o', 'a2.c', 'a2.o'},
31 self.assertSetEqual({'a.h', 'b.c', 'b.o'}, dep['libb.so'])
32 self.assertSetEqual({'c.c', 'c.o'}, dep['libc.so'])
35 def test_load_build_dep_ninja(self): argument
36 dep = load_build_dep_ninja(self.NINJA_PATH, self.MAP_TESTDATA_DIR,
[all …]
Dtest_ninja.py16 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/scripts/
Dstack_core.py70 def UpdateAbiRegexes(self): argument
72 self.width = "{16}"
73 self.spacing = " "
75 self.width = "{8}"
76 self.spacing = ""
78self.register_line = re.compile("(([ ]*\\b(" + self.register_names[symbol.ARCH] + ")\\b +[0-9a-f]"…
91 self.trace_line = re.compile(
95 "(?P<offset>[0-9a-f]" + self.width + ")[ \t]+" # Offset (hex number given without
104 self.sanitizer_trace_line = re.compile(
120self.value_line = re.compile("(.*)([0-9a-f]" + self.width + ")[ \t]+([0-9a-f]" + self.width + ")[ …
[all …]

12345