in build_script.py [0:0]
def build(args):
"""
Build XCTest and place the built products in the given 'build_dir'.
If 'test' is specified, also executes the 'test' subcommand.
"""
swiftc = os.path.abspath(args.swiftc)
build_dir = os.path.abspath(args.build_dir)
if args.build_style == "debug":
style_options = "Debug"
else:
style_options = "Release"
run("xcodebuild -workspace {source_dir}/XCTest.xcworkspace "
"-scheme SwiftXCTest "
"-configuration {style_options} "
"SWIFT_EXEC=\"{swiftc}\" "
"SWIFT_LINK_OBJC_RUNTIME=YES "
"INDEX_ENABLE_DATA_STORE=NO "
"SYMROOT=\"{build_dir}\" OBJROOT=\"{build_dir}\"".format(
swiftc=swiftc,
build_dir=build_dir,
style_options=style_options,
source_dir=SOURCE_DIR))
if args.test:
# Execute main() using the arguments necessary to run the tests.
main(args=["test",
"--swiftc", swiftc,
build_dir])