Lines Matching refs:host_dir
807 host_dir = tempfile.mkdtemp()
810 os.chmod(host_dir, 0o700)
813 temp_files = make_random_host_files(in_dir=host_dir, num_files=32)
814 self.device.push(host_dir, self.DEVICE_TEMP_DIR)
818 os.path.basename(host_dir),
823 if host_dir is not None:
824 shutil.rmtree(host_dir)
832 host_dir = tempfile.mkdtemp()
835 os.chmod(host_dir, 0o700)
838 empty_dir_path = os.path.join(host_dir, 'empty')
850 if host_dir is not None:
851 shutil.rmtree(host_dir)
860 host_dir = tempfile.mkdtemp()
864 os.chmod(host_dir, 0o700)
866 with open(os.path.join(host_dir, 'foo'), 'w') as f:
869 symlink_path = os.path.join(host_dir, 'symlink')
880 if host_dir is not None:
881 shutil.rmtree(host_dir)
893 host_dir = tempfile.mkdtemp()
896 temp_files = make_random_host_files(in_dir=host_dir, num_files=4)
898 subdir = os.path.join(host_dir, 'subdir')
922 if host_dir is not None:
923 shutil.rmtree(host_dir)
1012 host_dir = tempfile.mkdtemp()
1021 self.device.pull(remote=self.DEVICE_TEMP_DIR, local=host_dir)
1025 host_dir, posixpath.basename(self.DEVICE_TEMP_DIR),
1031 if host_dir is not None:
1032 shutil.rmtree(host_dir)
1043 host_dir = tempfile.mkdtemp()
1044 real_dir = os.path.join(host_dir, 'dir')
1045 symlink = os.path.join(host_dir, 'symlink')
1066 if host_dir is not None:
1067 shutil.rmtree(host_dir)
1075 host_dir = tempfile.mkdtemp()
1076 real_dir = os.path.join(host_dir, 'real')
1078 symlink = os.path.join(host_dir, tmp_dirname)
1089 self.device.pull(remote=self.DEVICE_TEMP_DIR, local=host_dir)
1097 if host_dir is not None:
1098 shutil.rmtree(host_dir)
1103 host_dir = tempfile.mkdtemp()
1104 dest_dir = os.path.join(host_dir, 'dest')
1121 if host_dir is not None:
1122 shutil.rmtree(host_dir)
1128 host_dir = tempfile.mkdtemp()
1147 self.device.pull(remote=remote_symlink, local=host_dir)
1151 host_dir, 'symlink', temp_file.base_name)
1156 if host_dir is not None:
1157 shutil.rmtree(host_dir)
1162 host_dir = tempfile.mkdtemp()
1168 self.device.pull(remote=remote_empty_path, local=host_dir)
1169 self.assertTrue(os.path.isdir(os.path.join(host_dir, 'empty')))
1171 if host_dir is not None:
1172 shutil.rmtree(host_dir)
1178 host_dir = tempfile.mkdtemp()
1193 self.device._simple_call(['pull'] + paths + [host_dir])
1196 local_path = os.path.join(host_dir, temp_file.base_name)
1200 local_path = os.path.join(host_dir,
1207 if host_dir is not None:
1208 shutil.rmtree(host_dir)
1311 host_dir = tempfile.mkdtemp()
1312 host_file = posixpath.join(host_dir, 'file')
1323 if host_dir is not None:
1324 shutil.rmtree(host_dir)
1338 host_dir = tempfile.mkdtemp()
1339 host_file = posixpath.join(host_dir, 'file')
1350 if host_dir is not None:
1351 shutil.rmtree(host_dir)