gh-141442: Add escaping to iOS testbed arguments (#141443)
Xcode concatenates the test argument array, losing quoting in the process.
This commit is contained in:
committed by
GitHub
parent
35ed3e4ced
commit
558936bec1
@@ -2,6 +2,7 @@ import argparse
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import shlex
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@@ -252,7 +253,7 @@ def update_test_plan(testbed_path, platform, args):
|
|||||||
test_plan = json.load(f)
|
test_plan = json.load(f)
|
||||||
|
|
||||||
test_plan["defaultOptions"]["commandLineArgumentEntries"] = [
|
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:
|
with test_plan_path.open("w", encoding="utf-8") as f:
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
The iOS testbed now correctly handles test arguments that contain spaces.
|
||||||
Reference in New Issue
Block a user