[libcxx-commits] [PATCH] D84045: [libcxx][lit] Add a new executor to collect test binaries

Bryce Adelstein Lelbach via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 2 10:27:36 PST 2020


wash added inline comments.


================
Comment at: libcxx/utils/copy_files.py:41
+    target_dir = args.output_dir
+    print("Copying", args.execdir, "to", target_dir, flush=True)
+    if not os.path.isdir(target_dir):
----------------
Can we use a Python file API to validate that both of these directories exist and are writeable?


================
Comment at: libcxx/utils/copy_files.py:44
+        os.makedirs(target_dir)
+    subprocess.check_call(["cp", "-av", args.execdir, target_dir])
+
----------------
Why is this using `subprocess` instead of using a Python API for file copying? Using an actual file copy API  would allow this script to remain platform independent and may help us handle errors better. For example, my org would love to use an executor like this on Windows.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84045/new/

https://reviews.llvm.org/D84045



More information about the libcxx-commits mailing list