Skip to content

Commit 6c408b9

Browse files
committed
Add a shortcut for using Swift 5.0 toolchain in benchmarks.py
1 parent c37102b commit 6c408b9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

benchmarks.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ def action_run(args):
197197
swift_command = ["xcrun", "-toolchain", args.toolchain]
198198
elif args.use_413:
199199
swift_command = ["xcrun", "-toolchain", "org.swift.41320180727a"]
200+
elif args.use_5:
201+
swift_command = ["xcrun", "-toolchain", "org.swift.5020190310a"]
200202
swift_command.append("swift")
201203
command = swift_command + ["test", "-c", "release", "--filter", args.filter]
202204
# macOS version of 'swift test' outputs to stderr instead of stdout.
@@ -263,6 +265,10 @@ def action_show(args):
263265
help=("use swift from toolchain with 'org.swift.41320180727a' identifier (this is a "
264266
"toolchain for Swift 4.1.3 which must already be installed; shortcut for "
265267
"'--toolchain org.swift.41320180727a')"))
268+
toolchain_option_group.add_argument("--5", action="store_true", dest="use_5",
269+
help=("use swift from toolchain with 'org.swift.5020190310a' identifier (this is a "
270+
"toolchain for Swift 5.0 which must already be installed; shortcut for "
271+
"'--toolchain org.swift.5020190310a')"))
266272

267273
parser_run.set_defaults(func=action_run)
268274

0 commit comments

Comments
 (0)