diff --git a/libcxx/utils/libcxx/test/executor.py b/libcxx/utils/libcxx/test/executor.py --- a/libcxx/utils/libcxx/test/executor.py +++ b/libcxx/utils/libcxx/test/executor.py @@ -158,6 +158,17 @@ srcs.extend(file_deps) dsts.extend(dev_paths) self.copy_in(srcs, dsts) + + # When testing executables that were cross-compiled on Windows for + # Linux, we may need to explicitly set the execution permission to + # avoid the 'Permission denied' error: + chmod_cmd = ['chmod', '+x', target_exe_path] + chmod_cmd, out, err, rc = self._execute_command_remote(chmod_cmd, + target_cwd, + env) + if rc != 0: + return (chmod_cmd, out, err, rc) + # TODO(jroelofs): capture the copy_in and delete_remote commands, # and conjugate them with '&&'s around the first tuple element # returned here: