Skip to content

Commit 4316180

Browse files
[3.14] gh-141442: Add escaping to iOS testbed arguments (GH-141443) (#141479)
Xcode concatenates the test argument array, losing quoting in the process. (cherry picked from commit 558936b) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
1 parent 996c003 commit 4316180

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Apple/testbed/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
import os
44
import re
5+
import shlex
56
import shutil
67
import subprocess
78
import sys
@@ -252,7 +253,7 @@ def update_test_plan(testbed_path, platform, args):
252253
test_plan = json.load(f)
253254

254255
test_plan["defaultOptions"]["commandLineArgumentEntries"] = [
255-
{"argument": arg} for arg in args
256+
{"argument": shlex.quote(arg)} for arg in args
256257
]
257258

258259
with test_plan_path.open("w", encoding="utf-8") as f:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The iOS testbed now correctly handles test arguments that contain spaces.

0 commit comments

Comments
 (0)