Lines Matching defs:os

22 import os
81 self.android_serial = os.getenv('ANDROID_SERIAL')
82 if 'ANDROID_SERIAL' in os.environ:
83 del os.environ['ANDROID_SERIAL']
87 os.environ['ANDROID_SERIAL'] = self.android_serial
89 if 'ANDROID_SERIAL' in os.environ:
90 del os.environ['ANDROID_SERIAL']
101 os.environ['ANDROID_SERIAL'] = 'foo'
108 os.environ['ANDROID_SERIAL'] = 'bar'
117 os.environ['ANDROID_SERIAL'] = 'baz'
406 if self.device.has_shell_protocol() and os.isatty(sys.stdin.fileno()):
485 os.kill(sleep_proc.pid, signal.SIGINT)
593 os.remove(tf.name)
676 self.base_name = os.path.basename(self.full_path)
695 rand_str = os.urandom(size)
743 rand_str = os.urandom(1024 * kbytes)
753 os.remove(tmp.name)
764 os.chmod(host_dir, 0o700)
772 os.path.basename(host_dir),
790 os.chmod(host_dir, 0o700)
793 os.mkdir(os.path.join(host_dir, 'empty'))
798 os.path.join(self.DEVICE_TEMP_DIR, 'empty')]
817 os.chmod(host_dir, 0o700)
819 with open(os.path.join(host_dir, 'foo'), 'w') as f:
822 symlink_path = os.path.join(host_dir, 'symlink')
823 os.symlink('foo', symlink_path)
851 subdir = os.path.join(host_dir, 'subdir')
852 os.mkdir(subdir)
904 os.remove(tmp_write.name)
948 host_path = os.path.join(
963 if os.name != 'posix':
968 real_dir = os.path.join(host_dir, 'dir')
969 symlink = os.path.join(host_dir, 'symlink')
970 os.mkdir(real_dir)
971 os.symlink(real_dir, symlink)
983 host_path = os.path.join(
995 if os.name != 'posix':
1000 real_dir = os.path.join(host_dir, 'real')
1001 tmp_dirname = os.path.basename(self.DEVICE_TEMP_DIR)
1002 symlink = os.path.join(host_dir, tmp_dirname)
1003 os.mkdir(real_dir)
1004 os.symlink(real_dir, symlink)
1016 host_path = os.path.join(real_dir, temp_file.base_name)
1028 dest_dir = os.path.join(host_dir, 'dest')
1040 host_path = os.path.join(dest_dir, temp_file.base_name)
1073 host_path = os.path.join(
1092 self.assertTrue(os.path.isdir(os.path.join(host_dir, 'empty')))
1119 local_path = os.path.join(host_dir, temp_file.base_name)
1123 local_path = os.path.join(host_dir,
1141 os.makedirs(full_dir_path)
1176 os.remove(tf.name)
1177 self.assertFalse(os.path.exists(tf.name))
1186 self.assertTrue(os.path.exists(tf.name))
1187 os.remove(tf.name)