Home
last modified time | relevance | path

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

12

/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 = ''
36 def GetName(self): argument
37 return self._name
[all …]
Dinstrumentation_test.py38 def __init__(self): argument
39 test_suite.AbstractTestSuite.__init__(self)
40 self._package_name = None
41 self._runner_name = self.DEFAULT_RUNNER
42 self._class_name = None
43 self._target_name = None
44 self._java_package = None
46 def GetPackageName(self): argument
47 return self._package_name
49 def SetPackageName(self, package_name): argument
[all …]
Dhost_test.py46 def __init__(self): argument
47 test_suite.AbstractTestSuite.__init__(self)
48 self._jar_name = None
49 self._class_name = None
51 def GetBuildDependencies(self, options): argument
53 return self._LIB_BUILD_PATHS
55 def GetClassName(self): argument
56 return self._class_name
58 def SetClassName(self, class_name): argument
59 self._class_name = class_name
[all …]
Dxml_suite_helper.py43 def Parse(self, element): argument
66 def _ParseCommonAttributes(self, suite_element, test_suite): argument
67 test_suite.SetName(self._ParseAttribute(suite_element, self._NAME_ATTR,
69 test_suite.SetBuildPath(self._ParseAttribute(suite_element,
70 self._BUILD_ATTR, True))
71 test_suite.SetContinuous(self._ParseAttribute(suite_element,
72 self._CONTINUOUS_ATTR,
74 test_suite.SetSuite(self._ParseAttribute(suite_element, self._SUITE_ATTR, False,
76 test_suite.SetDescription(self._ParseAttribute(suite_element,
77 self._DESCRIPTION_ATTR,
[all …]
Dtest_defs.py36 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 …]
Dtest_walker.py35 def FindTests(self, path): argument
70 self._build_top = android_build.GetTop()
71 if not self._IsPathInBuildTree(abspath):
73 (path, self._build_top))
78 tests = self._FindSubTests(abspath, [])
81 tests = self._FindUpstreamTests(abspath)
84 def _IsPathInBuildTree(self, path): argument
93 return os.path.commonprefix([self._build_top, path]) == self._build_top
95 def _MakePathRelativeToBuild(self, path): argument
107 if not self._IsPathInBuildTree(path):
[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 …]
Dsingletonmixin.py113 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 …]
Dlog.py24 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/scripts/
Ddivide_and_compress_test.py37 def NoOp(self): argument
44 def setUp(self): argument
49 self.my_mox = mox.Mox()
58 self.files = {'file1': file1, 'file2': file2}
60 def tearDown(self): argument
62 self.my_mox.UnsetStubs()
64 def testArchiveIsValid(self): argument
70 self.my_mox.StubOutWithMock(os, 'stat')
72 self.my_mox.StubOutWithMock(stat, 'ST_SIZE')
79 self.assertEqual(False, test_target.ArchiveIsValid(),
[all …]
Ddivide_and_compress.py121 def __init__(self, output_path, base_dir, archive_size, enable_compression): argument
133 self.output_dir = output_path
134 self.current_archive = '0.zip'
135 self.base_path = base_dir
136 self.max_size = archive_size
137 self.compress = enable_compression
140 self.index_fp = None
142 def StartCompress(self): argument
149 self.index_fp = open(os.path.join(self.output_dir, 'main.py'), 'w')
150 self.index_fp.write(divide_and_compress_constants.file_preamble)
[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 …]
Dandroid_manifest_tests.py28 def setUp(self): argument
30 self._manifest = android_manifest.AndroidManifest(app_path='.')
32 def testGetPackageName(self): argument
33 self.assertEquals('com.example.android.tests',
34 self._manifest.GetPackageName())
36 def testGetInstrumentationNames(self): argument
37 self.assertEquals(['android.test.InstrumentationTestRunner'],
38 self._manifest.GetInstrumentationNames())
/development/testrunner/
Dcoverage_targets.py42 def __init__(self, ): argument
43 self._target_map= {}
45 def __iter__(self): argument
46 return iter(self._target_map.values())
48 def Parse(self, file_path): argument
66 target_elements = doc.getElementsByTagName(self._TARGET_TAG_NAME)
70 self._AddTarget(target)
72 def _AddTarget(self, target): argument
73 self._target_map[target.GetName()] = target
75 def GetBuildTargets(self): argument
[all …]
Druntest.py75 def __init__(self): argument
77 self._root_path = android_build.GetTop()
79 self._adb = None
80 self._known_tests = None
81 self._options = None
82 self._test_args = None
83 self._tests_to_run = None
85 def _ProcessOptions(self): argument
89 self._TEST_FILE_NAME)
91 parser = optparse.OptionParser(usage=self._RUNTEST_USAGE)
[all …]
Dandroid_manifest.py35 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 …]
Dcoverage.py57 def __init__(self, adb_interface): argument
58 self._root_path = android_build.GetTop()
59 self._output_root_path = os.path.join(self._root_path,
60 self._COVERAGE_REPORT_PATH)
61 self._emma_jar_path = os.path.join(self._root_path, self._EMMA_JAR)
62 self._adb = adb_interface
63 self._targets_manifest = self._ReadTargets()
65 def ExtractReport(self, test_suite, argument
87 output_path = os.path.join(self._root_path,
88 self._COVERAGE_REPORT_PATH,
[all …]
Dandroid_mk.py37 def __init__(self, app_path=None): argument
38 self._includes = Set() # variables included in makefile
39 self._variables = {} # variables defined in makefile
42 self.ParseMK(app_path)
44 def _ProcessMKLine(self, line): argument
52 m = self._RE_INCLUDE.match(line)
54 self._includes.add(m.group(1))
56 parts = line.split(self._VAR_DELIMITER)
58 self._variables[parts[0].strip()] = parts[1].strip()
60 def GetVariable(self, identifier): argument
[all …]
Dadb_interface.py42 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 …]
Dam_instrument_parser.py127 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/samples/SampleSyncAdapter/samplesyncadapter_server/
Dmain.py45 def post(self): argument
46 self.username = self.request.get('username')
47 self.password = self.request.get('password')
48 password = datastore.UserCredentials.get(self.username)
49 if password == self.password:
50 self.response.set_status(200, 'OK')
52 self.response.out.write(password)
54 self.response.set_status(401, 'Invalid Credentials')
66 def post(self): argument
67 self.username = self.request.get('username')
[all …]
Ddashboard.py43 def get(self): argument
44 self.response.out.write('<html><body>'
49 self.response.out.write(UserForm())
50 self.response.out.write('</table>'
54 def post(self): argument
55 data = UserForm(data=self.request.POST)
60 self.redirect('/users')
63 self.response.out.write('<html><body>'
67 self.response.out.write(data)
68 self.response.out.write('</table>'
[all …]
/development/scripts/app_engine_server/
Dmemcache_zipserve.py74 def get(self, name): argument
75 self.zipfilenames = zip_files
76 self.TrueGet(name)
100 def TrueGet(self, reqUri): argument
124 langName = self.request.cookies['android_developer_pref_lang']
133 name = self.PreprocessUrl(reqUri, langName)
142 isValidIntl = sections[1] in self.validLangs
159 if self.isCleanUrl(name, langName, isValidIntl, isStripped):
163 if not self.CreateResponse(name, langName, isValidIntl, resetLangCookie):
168 self.CreateResponse(contentUri, langName, False, resetLangCookie)
[all …]
/development/ndk/platforms/android-9/include/SLES/
DOpenSLES.h403 SLObjectItf self,
407 SLObjectItf self,
411 SLObjectItf self,
415 SLObjectItf self,
420 SLObjectItf self,
425 SLObjectItf self
428 SLObjectItf self
431 SLObjectItf self,
436 SLObjectItf self,
441 SLObjectItf self,
[all …]
/development/scripts/app_engine_server/gae_shell/
Dshell.py106 def set_global(self, name, value): argument
117 if name in self.global_names:
118 index = self.global_names.index(name)
119 self.globals[index] = blob
121 self.global_names.append(db.Text(name))
122 self.globals.append(blob)
124 self.remove_unpicklable_name(name)
126 def remove_global(self, name): argument
132 if name in self.global_names:
133 index = self.global_names.index(name)
[all …]

12