[libcxx-commits] [libcxx] 232fec9 - [libcxx] [test] Add an option to ssh.py for using a different temp path

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 5 09:41:21 PST 2021


Author: Martin Storsjö
Date: 2021-03-05T19:37:31+02:00
New Revision: 232fec941d2301165ea20ba8e6970bdf3c515c84

URL: https://github.com/llvm/llvm-project/commit/232fec941d2301165ea20ba8e6970bdf3c515c84
DIFF: https://github.com/llvm/llvm-project/commit/232fec941d2301165ea20ba8e6970bdf3c515c84.diff

LOG: [libcxx] [test] Add an option to ssh.py for using a different temp path

If cross testing on Windows via WSL (at least with WSL 1), the Windows
executables can't be executed if they are in WSL specific directories
(like /tmp).

Differential Revision: https://reviews.llvm.org/D98028

Added: 
    

Modified: 
    libcxx/utils/ssh.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/ssh.py b/libcxx/utils/ssh.py
index 8a30cc3865ed..a434271265a4 100755
--- a/libcxx/utils/ssh.py
+++ b/libcxx/utils/ssh.py
@@ -41,6 +41,7 @@ def main():
     parser = argparse.ArgumentParser()
     parser.add_argument('--host', type=str, required=True)
     parser.add_argument('--execdir', type=str, required=True)
+    parser.add_argument('--tempdir', type=str, required=False, default='/tmp')
     parser.add_argument('--extra-ssh-args', type=str, required=False)
     parser.add_argument('--extra-scp-args', type=str, required=False)
     parser.add_argument('--codesign_identity', type=str, required=False, default=None)
@@ -51,7 +52,7 @@ def main():
 
     # Create a temporary directory where the test will be run.
     # That is effectively the value of %T on the remote host.
-    tmp = subprocess.check_output(ssh(args, 'mktemp -d /tmp/libcxx.XXXXXXXXXX'), universal_newlines=True).strip()
+    tmp = subprocess.check_output(ssh(args, 'mktemp -d {}/libcxx.XXXXXXXXXX'.format(args.tempdir)), universal_newlines=True).strip()
 
     # HACK:
     # If an argument is a file that ends in `.tmp.exe`, assume it is the name


        


More information about the libcxx-commits mailing list