[libcxx-commits] [PATCH] D83429: [libc++] [test] Introduce the `--test-executable` option in ssh.py
Sergej Jaskiewicz via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 8 14:49:51 PDT 2020
broadwaylamb created this revision.
broadwaylamb added a reviewer: ldionne.
Herald added subscribers: libcxx-commits, dexonsmith.
Herald added a project: libc++.
Herald added a reviewer: libc++.
The new optional command line argument allows to specify the executable that should be `chmod +x`'ed.
Previously we considered a file a test executable if it ended with `.tmp.exe`.
This patch allows using `ssh.py` for running tests that don't follow this convention, for example, in the compiler-rt project.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83429
Files:
libcxx/utils/ssh.py
Index: libcxx/utils/ssh.py
===================================================================
--- libcxx/utils/ssh.py
+++ libcxx/utils/ssh.py
@@ -28,6 +28,7 @@
parser.add_argument('--host', type=str, required=True)
parser.add_argument('--execdir', type=str, required=True)
parser.add_argument('--codesign_identity', type=str, required=False, default=None)
+ parser.add_argument('--test-executable', type=str, required=False, default=None)
parser.add_argument('--env', type=str, nargs='*', required=False, default=dict())
(args, remaining) = parser.parse_known_args(sys.argv[1:])
@@ -51,7 +52,9 @@
# and changing their path when running on the remote host. It's also possible
# for there to be no such executable, for example in the case of a .sh.cpp
# test.
- isTestExe = lambda exe: exe.endswith('.tmp.exe') and os.path.exists(exe)
+ def isTestExe(exe):
+ return (exe == args.test_executable or exe.endswith('.tmp.exe')) and os.path.exists(exe)
+
pathOnRemote = lambda file: posixpath.join(tmp, os.path.basename(file))
try:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83429.276560.patch
Type: text/x-patch
Size: 1096 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200708/3f6e7784/attachment.bin>
More information about the libcxx-commits
mailing list