• Home
  • Raw
  • Download

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
239 def CreateFile(self, name=None): argument
252 def WriteLines(self, file_path, lines): argument
263 def RunCommand(self, cmd, log_severity=LogSeverity.ERROR): argument
274 def logfile(self): argument
287 def __init__(self, directory_prefix, cleanup=True, logfile_path=None, argument
298 self._cleanup = cleanup
299 self._timeout = timeout
300 self._env_path = mkdtemp(dir='/tmp/', prefix=directory_prefix)
302 self._logfile = open('{0}/log'.format(self._env_path), 'w+')
304 self._logfile = open(logfile_path, 'w+')
305 os.mkdir('{0}/dalvik-cache'.format(self._env_path))
306 for arch_cache_path in _DexArchCachePaths(self._env_path):
312 self._shell_env = os.environ.copy()
313 self._shell_env['ANDROID_DATA'] = self._env_path
314 self._shell_env['ANDROID_ROOT'] = android_root
315 self._shell_env['LD_LIBRARY_PATH'] = library_path
316 self._shell_env['DYLD_LIBRARY_PATH'] = library_path
317 self._shell_env['PATH'] = (path + ':' + self._shell_env['PATH'])
319 self._shell_env['LD_USE_LOAD_BIAS'] = '1'
321 def __del__(self): argument
322 if self._cleanup:
323 shutil.rmtree(self._env_path)
325 def CreateFile(self, name=None): argument
327 f = NamedTemporaryFile(dir=self._env_path, delete=False)
329 f = open('{0}/{1}'.format(self._env_path, name), 'w+')
332 def WriteLines(self, file_path, lines): argument
337 def RunCommand(self, cmd, log_severity=LogSeverity.ERROR): argument
338 self._EmptyDexCache()
339 env = self._shell_env.copy()
342 cmd, env, PIPE, PIPE, self._timeout)
346 _LogCmdOutput(self._logfile, cmd, output, retcode)
350 def logfile(self): argument
351 return self._logfile
353 def _EmptyDexCache(self): argument
359 for arch_cache_path in _DexArchCachePaths(self._env_path):
372 def __init__(self, directory_prefix, cleanup=True, logfile_path=None, argument
383 self._cleanup = cleanup
384 self._timeout = timeout
385 self._specific_device = specific_device
386 self._host_env_path = mkdtemp(dir='/tmp/', prefix=directory_prefix)
388 self._logfile = open('{0}/log'.format(self._host_env_path), 'w+')
390 self._logfile = open(logfile_path, 'w+')
391 self._device_env_path = '{0}/{1}'.format(
392 DEVICE_TMP_PATH, os.path.basename(self._host_env_path))
393 self._shell_env = os.environ.copy()
395 self._AdbMkdir('{0}/dalvik-cache'.format(self._device_env_path))
396 for arch_cache_path in _DexArchCachePaths(self._device_env_path):
397 self._AdbMkdir(arch_cache_path)
399 def __del__(self): argument
400 if self._cleanup:
401 shutil.rmtree(self._host_env_path)
404 .format(self._device_env_path)))
406 def CreateFile(self, name=None): argument
408 self._AdbPush(temp_file.name, self._device_env_path)
411 return '{0}/{1}'.format(self._device_env_path, name)
413 def WriteLines(self, file_path, lines): argument
417 self._AdbPush(temp_file.name, file_path)
420 def _ExtractPid(self, brief_log_line): argument
430 def _ExtractSeverity(self, brief_log_line): argument
436 def RunCommand(self, cmd, log_severity=LogSeverity.ERROR): argument
437 self._EmptyDexCache()
439 self._device_env_path)
441 if self._specific_device:
442 adb_cmd += ['-s', self._specific_device]
452 (output, _, retcode) = RunCommandForOutput(cmd, self._shell_env, PIPE,
453 STDOUT, self._timeout)
468 dex2oat_pids.append(self._ExtractPid(line))
472 if (self._ExtractPid(line) in dex2oat_pids and
473 self._ExtractSeverity(line) >= log_severity):
475 _LogCmdOutput(self._logfile, cmd, output, retcode)
479 def logfile(self): argument
480 return self._logfile
482 def PushClasspath(self, classpath): argument
497 self._device_env_path, os.path.basename(path)))
498 self._AdbPush(path, self._device_env_path)
501 def _AdbPush(self, what, where): argument
503 stdout=self._logfile, stderr=self._logfile)
505 def _AdbMkdir(self, path): argument
507 stdout=self._logfile, stderr=self._logfile)
509 def _EmptyDexCache(self): argument
511 for arch_cache_path in _DexArchCachePaths(self._device_env_path):
514 check_call(shlex.split(cmd), stdout=self._logfile, stderr=self._logfile)