/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 37 def GetName(self): argument [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 …]
|
D | xml_suite_helper.py | 44 def Parse(self, element): argument 67 def _ParseCommonAttributes(self, suite_element, test_suite): argument 68 test_suite.SetName(self._ParseAttribute(suite_element, self._NAME_ATTR, 70 test_suite.SetBuildPath(self._ParseAttribute(suite_element, 71 self._BUILD_ATTR, True)) 72 test_suite.SetContinuous(self._ParseAttribute(suite_element, 73 self._CONTINUOUS_ATTR, 75 test_suite.SetSuite(self._ParseAttribute(suite_element, self._SUITE_ATTR, False, 77 test_suite.SetDescription(self._ParseAttribute(suite_element, 78 self._DESCRIPTION_ATTR, [all …]
|
D | host_test.py | 47 def __init__(self): argument 48 test_suite.AbstractTestSuite.__init__(self) 49 self._jar_name = None 50 self._class_name = None 52 def GetBuildDependencies(self, options): argument 54 return self._LIB_BUILD_PATHS 56 def GetClassName(self): argument 57 return self._class_name 59 def SetClassName(self, class_name): argument 60 self._class_name = class_name [all …]
|
D | test_walker.py | 34 def FindTests(self, path): argument 76 self._build_top = os.path.realpath(android_build.GetTop()) 77 if not self._IsPathInBuildTree(realpath): 79 (path, self._build_top)) 84 tests = self._FindSubTests(realpath, []) 87 tests = self._FindUpstreamTests(realpath) 90 def _IsPathInBuildTree(self, path): argument 99 return os.path.commonprefix([self._build_top, path]) == self._build_top 101 def _MakePathRelativeToBuild(self, path): argument 113 if not self._IsPathInBuildTree(path): [all …]
|
D | test_defs.py | 36 def __init__(self): argument 38 self._testname_map = {} 40 def __iter__(self): argument 42 for k in sorted(self._testname_map): 43 ordered_list.append(self._testname_map[k]) 46 def Parse(self, file_path): argument 56 self._ParseDoc(doc) 67 def ParseString(self, xml_string): argument 71 return self._ParseDoc(doc) 73 def _ParseDoc(self, doc): argument [all …]
|
D | gtest.py | 33 def __init__(self): argument 34 test_suite.AbstractTestSuite.__init__(self) 35 self._target_exec_path = None 37 def GetTargetExecPath(self): argument 39 return self._target_exec_path 41 def SetTargetExecPath(self, path): argument 42 self._target_exec_path = path 43 return self 45 def Run(self, options, adb): argument 52 shell_cmd = adb.PreviewShellCommand(self.GetTargetExecPath()) [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 …]
|
D | singletonmixin.py | 113 def testReturnsSameObject(self): argument 119 def __init__(self): argument 120 super(A, self).__init__() 124 self.assertEquals(id(a1), id(a2)) 126 def testInstantiateWithMultiArgConstructor(self): argument 134 def __init__(self, arg1, arg2): argument 135 super(B, self).__init__() 136 self.arg1 = arg1 137 self.arg2 = arg2 141 self.assertEquals(b1.arg1, 'arg1 value') [all …]
|
D | log.py | 24 def __init__(self, file): argument 28 self._file = open(file, "a") 30 self._file = file 32 def _getTime(self): argument 38 def _log(self, *logstrs): argument 39 timeStr = self._getTime() 41 self._file.write("%s %s\n" % (timeStr, ln)) 42 self._file.flush() 44 def debug(self, *logstrs): argument 45 self._log("D", *logstrs) [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 …]
|
D | android_mk_tests.py | 28 def testHasGTest(self): argument 32 self.assertTrue(mk_parser.HasGTest()) 34 def testHasGTest_lib(self): argument 38 self.assertTrue(mk_parser.HasGTest()) 40 def testHasGTest_false(self): argument 43 self.assertFalse(mk_parser.HasGTest()) 45 def testHasJavaLibrary(self): argument 49 self.assertTrue(mk_parser.HasJavaLibrary('android.test.runner')) 51 def testHasJavaLibrary_missing(self): argument 58 self.assertFalse(mk_parser.HasJavaLibrary('android.test.runner')) [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 …]
|
D | adb_interface.py | 42 def SetEmulatorTarget(self): argument 44 self._target_arg = "-e" 46 def SetDeviceTarget(self): argument 48 self._target_arg = "-d" 50 def SetTargetSerial(self, serial): argument 52 self._target_arg = "-s %s" % serial 54 def SendCommand(self, command_string, timeout_time=20, retry_count=3): argument 69 adb_cmd = "adb %s %s" % (self._target_arg, command_string) 74 def SendShellCommand(self, cmd, timeout_time=20, retry_count=3): argument 90 return self.SendCommand("shell %s" % cmd, timeout_time=timeout_time, [all …]
|
D | android_mk.py | 40 def __init__(self): argument 41 self._includes = Set() # variables included in makefile 42 self._variables = {} # variables defined in makefile 43 self._has_gtestlib = False 45 def _ProcessMKLine(self, line): argument 53 m = self._RE_INCLUDE.match(line) 55 self._includes.add(m.group(1)) 57 parts = line.split(self._VAR_DELIMITER) 59 self._variables[parts[0].strip()] = parts[1].strip() 62 self._has_gtestlib = True [all …]
|
D | android_manifest.py | 35 def __init__(self, app_path=None): argument 37 self._ParseManifest(app_path) 39 def GetAppPath(self): argument 41 return self._app_path 43 def GetPackageName(self): argument 49 manifest = self._GetManifestElement() 54 def _ParseManifest(self, app_path): argument 63 self._app_path = app_path 64 self._manifest_path = os.path.join(app_path, self.FILENAME) 65 self._dom = xml.dom.minidom.parse(self._manifest_path) [all …]
|
D | am_instrument_parser.py | 127 def __init__(self, result_block_string): argument 135 self._test_name = None 136 self._status_code = None 137 self._failure_reason = None 138 self._fields_map = {} 149 self._fields_map[key] = value 150 self._fields_map.setdefault('class') 151 self._fields_map.setdefault('test') 153 self._test_name = '%s:%s' % (self._fields_map['class'], 154 self._fields_map['test']) [all …]
|
/development/scripts/ |
D | stack_core.py | 48 def __init__(self): argument 49 self.UpdateAbiRegexes() 59 def UpdateAbiRegexes(self): argument 61 self.width = "{16}" 63 self.width = "{8}" 65 …self.register_line = re.compile("(([ ]*\\b(" + self.register_names[symbol.ARCH] + ")\\b +[0-9a-f]"… 78 …self.trace_line = re.compile("(.*)\#([0-9]+)[ \t]+(..)[ \t]+([0-9a-f]" + self.width + ")[ \t]+([^\… 84 …self.value_line = re.compile("(.*)([0-9a-f]" + self.width + ")[ \t]+([0-9a-f]" + self.width + ")[ … 92 self.code_line = re.compile("(.*)[ \t]*[a-f0-9]" + self.width + 93 "[ \t]*[a-f0-9]" + self.width + [all …]
|
/development/ndk/tools/ |
D | headers-diff-bionic-vs-ndk.py | 21 def __init__(self, platforms_root, archs): argument 23 self.platforms = [] 24 self.archs = archs 25 self.sysincludes = {} 26 for arch in self.archs: 27 self.sysincludes[arch] = {} 33 self.platforms.append(dirname) 35 self.platforms.sort(key = lambda s: int(s.split('-')[1])) 36 self.root = platforms_root 38 print 'Wrong platforms list \n{0}'.format(str(self.platforms)) [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 …]
|
D | coverage.py | 59 def __init__(self, adb_interface): argument 60 self._root_path = android_build.GetTop() 61 self._out_path = android_build.GetOut() 62 self._output_root_path = os.path.join(self._out_path, 63 self._COVERAGE_REPORT_PATH) 64 self._emma_jar_path = os.path.join(self._root_path, self._EMMA_JAR) 65 self._adb = adb_interface 66 self._targets_manifest = self._ReadTargets() 68 def ExtractReport(self, argument 93 output_path = os.path.join(self._out_path, [all …]
|
D | coverage_targets.py | 49 def __init__(self, ): argument 50 self._target_map= {} 52 def __iter__(self): argument 53 return iter(self._target_map.values()) 55 def Parse(self, file_path): argument 73 target_elements = doc.getElementsByTagName(self._TARGET_TAG_NAME) 77 self._ParseCoverageTarget(target, target_element) 78 self._AddTarget(target) 80 def _AddTarget(self, target): argument 81 self._target_map[target.GetName()] = target [all …]
|
/development/samples/SampleSyncAdapter/samplesyncadapter_server/ |
D | web_services.py | 66 def authenticate(self): argument 67 self.username = self.request.get('username') 68 self.password = self.request.get('password') 70 logging.info('Authenticatng username: ' + self.username) 72 if ((self.username != None) and 73 (self.username.startswith(BaseWebServiceHandler.ACCT_USER_NAME)) and 74 (self.password == BaseWebServiceHandler.ACCT_PASSWORD)): 77 self.response.set_status(200, 'OK') 78 self.response.out.write(BaseWebServiceHandler.ACCT_AUTH_TOKEN) 83 self.response.set_status(401, 'Invalid Credentials') [all …]
|
D | dashboard.py | 45 def send_form(self, title, action, contactId, handle, content_obj): argument 63 self.response.out.write(template.render(path, template_values)) 79 def get(self): argument 80 self.send_form('Add Contact', '/add_contact', -1, None, ContactForm()) 82 def post(self): argument 83 data = ContactForm(data=self.request.POST) 88 self.redirect('/') 91 self.send_form('Add Contact', '/add_contact', -1, None, data) 101 def get(self): argument 102 id = int(self.request.get('id')) [all …]
|