diff --git a/Misc/NEWS.d/next/Tools-Demos/2025-11-12-12-54-28.gh-issue-141442.50dS3P.rst b/Misc/NEWS.d/next/Tools-Demos/2025-11-12-12-54-28.gh-issue-141442.50dS3P.rst new file mode 100644 index 00000000000000..073c070413f7e0 --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2025-11-12-12-54-28.gh-issue-141442.50dS3P.rst @@ -0,0 +1 @@ +The iOS testbed now correctly handles test arguments that contain spaces. diff --git a/iOS/testbed/__main__.py b/iOS/testbed/__main__.py index 6a4d9c76d162b4..62a85a034ebd5f 100644 --- a/iOS/testbed/__main__.py +++ b/iOS/testbed/__main__.py @@ -1,6 +1,7 @@ import argparse import json import re +import shlex import shutil import subprocess import sys @@ -206,7 +207,7 @@ def update_test_plan(testbed_path, args): test_plan = json.load(f) test_plan["defaultOptions"]["commandLineArgumentEntries"] = [ - {"argument": arg} for arg in args + {"argument": shlex.quote(arg)} for arg in args ] with test_plan_path.open("w", encoding="utf-8") as f: