mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.13] gh-141442: Add escaping to iOS testbed arguments (GH-141443) (#141480)
Xcode concatenates the test argument array, losing quoting in the process.
(cherry picked from commit 558936bec1)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
This commit is contained in:
parent
7c62bd571b
commit
6aeb0d5b2a
2 changed files with 3 additions and 1 deletions
|
|
@ -0,0 +1 @@
|
|||
The iOS testbed now correctly handles test arguments that contain spaces.
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue