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):
307 self._shell_env = os.environ.copy()
308 self._shell_env['ANDROID_DATA'] = self._env_path
309 self._shell_env['ANDROID_ROOT'] = android_root
310 self._shell_env['ANDROID_I18N_ROOT'] = android_i18n_root
311 self._shell_env['ANDROID_ART_ROOT'] = android_art_root
312 self._shell_env['ANDROID_TZDATA_ROOT'] = android_tzdata_root
313 self._shell_env['LD_LIBRARY_PATH'] = library_path
314 self._shell_env['DYLD_LIBRARY_PATH'] = library_path
315 self._shell_env['PATH'] = (path + ':' + self._shell_env['PATH'])
317 self._shell_env['LD_USE_LOAD_BIAS'] = '1'
319 def __del__(self): argument
320 if self._cleanup:
321 shutil.rmtree(self._env_path)
323 def CreateFile(self, name=None): argument
325 f = NamedTemporaryFile(dir=self._env_path, delete=False)
327 f = open('{0}/{1}'.format(self._env_path, name), 'w+')
330 def WriteLines(self, file_path, lines): argument
335 def RunCommand(self, cmd, log_severity=LogSeverity.ERROR): argument
336 self._EmptyDexCache()
337 env = self._shell_env.copy()
340 cmd, env, PIPE, PIPE, self._timeout)
344 _LogCmdOutput(self._logfile, cmd, output, retcode)
348 def logfile(self): argument
349 return self._logfile
351 def _EmptyDexCache(self): argument
357 for arch_cache_path in _DexArchCachePaths(self._env_path):
370 def __init__(self, directory_prefix, cleanup=True, logfile_path=None, argument
381 self._cleanup = cleanup
382 self._timeout = timeout
383 self._specific_device = specific_device
384 self._host_env_path = mkdtemp(dir='/tmp/', prefix=directory_prefix)
386 self._logfile = open('{0}/log'.format(self._host_env_path), 'w+')
388 self._logfile = open(logfile_path, 'w+')
389 self._device_env_path = '{0}/{1}'.format(
390 DEVICE_TMP_PATH, os.path.basename(self._host_env_path))
391 self._shell_env = os.environ.copy()
393 self._AdbMkdir('{0}/dalvik-cache'.format(self._device_env_path))
394 for arch_cache_path in _DexArchCachePaths(self._device_env_path):
395 self._AdbMkdir(arch_cache_path)
397 def __del__(self): argument
398 if self._cleanup:
399 shutil.rmtree(self._host_env_path)
402 .format(self._device_env_path)))
404 def CreateFile(self, name=None): argument
406 self._AdbPush(temp_file.name, self._device_env_path)
409 return '{0}/{1}'.format(self._device_env_path, name)
411 def WriteLines(self, file_path, lines): argument
415 self._AdbPush(temp_file.name, file_path)
418 def _ExtractPid(self, brief_log_line): argument
428 def _ExtractSeverity(self, brief_log_line): argument
434 def RunCommand(self, cmd, log_severity=LogSeverity.ERROR): argument
435 self._EmptyDexCache()
437 self._device_env_path)
439 if self._specific_device:
440 adb_cmd += ['-s', self._specific_device]
450 (output, _, retcode) = RunCommandForOutput(cmd, self._shell_env, PIPE,
451 STDOUT, self._timeout)
466 dex2oat_pids.append(self._ExtractPid(line))
470 if (self._ExtractPid(line) in dex2oat_pids and
471 self._ExtractSeverity(line) >= log_severity):
473 _LogCmdOutput(self._logfile, cmd, output, retcode)
477 def logfile(self): argument
478 return self._logfile
480 def PushClasspath(self, classpath): argument
495 self._device_env_path, os.path.basename(path)))
496 self._AdbPush(path, self._device_env_path)
499 def _AdbPush(self, what, where): argument
501 stdout=self._logfile, stderr=self._logfile)
503 def _AdbMkdir(self, path): argument
505 stdout=self._logfile, stderr=self._logfile)
507 def _EmptyDexCache(self): argument
509 for arch_cache_path in _DexArchCachePaths(self._device_env_path):
512 check_call(shlex.split(cmd), stdout=self._logfile, stderr=self._logfile)