Index: test/libcxx/test/executor.py =================================================================== --- test/libcxx/test/executor.py +++ test/libcxx/test/executor.py @@ -110,21 +110,23 @@ def run(self, exe_path, cmd=None, work_dir='.', env=None): target_exe_path = None target_cwd = None + data_files = [f for f in os.listdir(work_dir) if f.endswith('.dat')] try: - target_exe_path = self.remote_temp_file() target_cwd = self.remote_temp_dir() + target_exe_path = os.path.join(target_cwd, 'libcxx_test') if cmd: # Replace exe_path with target_exe_path. cmd = [c if c != exe_path else target_exe_path for c in cmd] else: cmd = [target_exe_path] + self.copy_in([exe_path], [target_exe_path]) + for data_file in data_files: + df_path = os.path.join(work_dir, data_file) + df_dev_path = os.path.join(target_cwd, data_file) + self._copy_in_file(df_path, df_dev_path) return self._execute_command_remote(cmd, target_cwd, env) - except: - raise finally: - if target_exe_path: - self.delete_remote(target_exe_path) if target_cwd: self.delete_remote(target_cwd)