[libcxx-commits] [libcxx] [libcxx] [test] Quote the python executable in the executor (PR #68208)
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 4 04:31:21 PDT 2023
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/68208
This reapplies the change from
c218c80c730a14a1cbcebd588b18220a879702c6, which was lost in the refactoring in 78d649a417b48cb8a2ba2e755f0e7c8fb8b1bb83.
On Windows, the Python interpreter is by default installed in a path like "C:\Program Files\Python38\python.exe", which requires quoting when included in a concatenated command string (as opposed to a command list, where each argument is a separate element).
This doesn't show up in the CI environments as they use Python installed in a different directory, like C:\Python.
>From bc81db472862283e06bcab01432bc6308df4937a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
Date: Wed, 4 Oct 2023 11:09:41 +0000
Subject: [PATCH] [libcxx] [test] Quote the python executable in the executor
This reapplies the change from
c218c80c730a14a1cbcebd588b18220a879702c6, which was lost in the
refactoring in 78d649a417b48cb8a2ba2e755f0e7c8fb8b1bb83.
On Windows, the Python interpreter is by default installed in
a path like "C:\Program Files\Python38\python.exe", which requires
quoting when included in a concatenated command string (as opposed
to a command list, where each argument is a separate element).
This doesn't show up in the CI environments as they use Python
installed in a different directory, like C:\Python.
---
libcxx/utils/libcxx/test/params.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index d4e4b722347d623..16dcc837108c550 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -320,7 +320,7 @@ def getStdFlag(cfg, std):
Parameter(
name="executor",
type=str,
- default=f"{sys.executable} {Path(__file__).resolve().parent.parent.parent / 'run.py'}",
+ default=f"\"{sys.executable}\" {Path(__file__).resolve().parent.parent.parent / 'run.py'}",
help="Custom executor to use instead of the configured default.",
actions=lambda executor: [AddSubstitution("%{executor}", executor)],
)
More information about the libcxx-commits
mailing list