Lines Matching refs:self

67   def symbol(self):  argument
68 return self.name[0]
77 def __ge__(self, other): argument
78 if self.__class__ is other.__class__:
79 return self.value >= other.value
82 def __gt__(self, other): argument
83 if self.__class__ is other.__class__:
84 return self.value > other.value
87 def __le__(self, other): argument
88 if self.__class__ is other.__class__:
89 return self.value <= other.value
92 def __lt__(self, other): argument
93 if self.__class__ is other.__class__:
94 return self.value < other.value
231 def CreateFile(self, name=None): argument
244 def WriteLines(self, file_path, lines): argument
255 def RunCommand(self, cmd, log_severity=LogSeverity.ERROR): argument
266 def logfile(self): argument
279 def __init__(self, directory_prefix, cleanup=True, logfile_path=None, argument
290 self._cleanup = cleanup
291 self._timeout = timeout
292 self._env_path = mkdtemp(dir='/tmp/', prefix=directory_prefix)
294 self._logfile = open('{0}/log'.format(self._env_path), 'w+')
296 self._logfile = open(logfile_path, 'w+')
297 os.mkdir('{0}/dalvik-cache'.format(self._env_path))
298 for arch_cache_path in _DexArchCachePaths(self._env_path):
306 self._shell_env = os.environ.copy()
307 self._shell_env['ANDROID_DATA'] = self._env_path
308 self._shell_env['ANDROID_ROOT'] = android_root
309 self._shell_env['ANDROID_RUNTIME_ROOT'] = android_runtime_root
310 self._shell_env['ANDROID_TZDATA_ROOT'] = android_tzdata_root
311 self._shell_env['LD_LIBRARY_PATH'] = library_path
312 self._shell_env['DYLD_LIBRARY_PATH'] = library_path
313 self._shell_env['PATH'] = (path + ':' + self._shell_env['PATH'])
315 self._shell_env['LD_USE_LOAD_BIAS'] = '1'
317 def __del__(self): argument
318 if self._cleanup:
319 shutil.rmtree(self._env_path)
321 def CreateFile(self, name=None): argument
323 f = NamedTemporaryFile(dir=self._env_path, delete=False)
325 f = open('{0}/{1}'.format(self._env_path, name), 'w+')
328 def WriteLines(self, file_path, lines): argument
333 def RunCommand(self, cmd, log_severity=LogSeverity.ERROR): argument
334 self._EmptyDexCache()
335 env = self._shell_env.copy()
338 cmd, env, PIPE, PIPE, self._timeout)
342 _LogCmdOutput(self._logfile, cmd, output, retcode)
346 def logfile(self): argument
347 return self._logfile
349 def _EmptyDexCache(self): argument
355 for arch_cache_path in _DexArchCachePaths(self._env_path):
368 def __init__(self, directory_prefix, cleanup=True, logfile_path=None, argument
379 self._cleanup = cleanup
380 self._timeout = timeout
381 self._specific_device = specific_device
382 self._host_env_path = mkdtemp(dir='/tmp/', prefix=directory_prefix)
384 self._logfile = open('{0}/log'.format(self._host_env_path), 'w+')
386 self._logfile = open(logfile_path, 'w+')
387 self._device_env_path = '{0}/{1}'.format(
388 DEVICE_TMP_PATH, os.path.basename(self._host_env_path))
389 self._shell_env = os.environ.copy()
391 self._AdbMkdir('{0}/dalvik-cache'.format(self._device_env_path))
392 for arch_cache_path in _DexArchCachePaths(self._device_env_path):
393 self._AdbMkdir(arch_cache_path)
395 def __del__(self): argument
396 if self._cleanup:
397 shutil.rmtree(self._host_env_path)
400 .format(self._device_env_path)))
402 def CreateFile(self, name=None): argument
404 self._AdbPush(temp_file.name, self._device_env_path)
407 return '{0}/{1}'.format(self._device_env_path, name)
409 def WriteLines(self, file_path, lines): argument
413 self._AdbPush(temp_file.name, file_path)
416 def _ExtractPid(self, brief_log_line): argument
426 def _ExtractSeverity(self, brief_log_line): argument
432 def RunCommand(self, cmd, log_severity=LogSeverity.ERROR): argument
433 self._EmptyDexCache()
435 self._device_env_path)
437 if self._specific_device:
438 adb_cmd += ['-s', self._specific_device]
448 (output, _, retcode) = RunCommandForOutput(cmd, self._shell_env, PIPE,
449 STDOUT, self._timeout)
464 dex2oat_pids.append(self._ExtractPid(line))
468 if (self._ExtractPid(line) in dex2oat_pids and
469 self._ExtractSeverity(line) >= log_severity):
471 _LogCmdOutput(self._logfile, cmd, output, retcode)
475 def logfile(self): argument
476 return self._logfile
478 def PushClasspath(self, classpath): argument
493 self._device_env_path, os.path.basename(path)))
494 self._AdbPush(path, self._device_env_path)
497 def _AdbPush(self, what, where): argument
499 stdout=self._logfile, stderr=self._logfile)
501 def _AdbMkdir(self, path): argument
503 stdout=self._logfile, stderr=self._logfile)
505 def _EmptyDexCache(self): argument
507 for arch_cache_path in _DexArchCachePaths(self._device_env_path):
510 check_call(shlex.split(cmd), stdout=self._logfile, stderr=self._logfile)