[libcxx-commits] [PATCH] D69170: [libcxx] [test] Run `chmod +x` on executables when testing via SSH
Sergej Jaskiewicz via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 18 08:10:53 PDT 2019
broadwaylamb created this revision.
Herald added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, ldionne, christof.
Herald added a project: libc++.
When running libc++ tests on a remote machine via SSH, we can encounter
a 'Permission denied' error.
Fix this with plain old 'chmod +x <executable>'.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D69170
Files:
libcxx/utils/libcxx/test/executor.py
Index: libcxx/utils/libcxx/test/executor.py
===================================================================
--- libcxx/utils/libcxx/test/executor.py
+++ 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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69170.225632.patch
Type: text/x-patch
Size: 1099 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20191018/c18ce65d/attachment.bin>
More information about the libcxx-commits
mailing list