diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py index d4e4b722347d623..456794b9b1cce95 100644 --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -7,6 +7,7 @@ # ===----------------------------------------------------------------------===## import sys import re +import shlex from pathlib import Path from libcxx.test.dsl import * @@ -320,7 +321,7 @@ def getStdFlag(cfg, std): Parameter( name="executor", type=str, - default=f"{sys.executable} {Path(__file__).resolve().parent.parent.parent / 'run.py'}", + default=f"{shlex.quote(sys.executable)} {shlex.quote(str(Path(__file__).resolve().parent.parent.parent / 'run.py'))}", help="Custom executor to use instead of the configured default.", actions=lambda executor: [AddSubstitution("%{executor}", executor)], )