Skip to content

Commit b7fa6e8

Browse files
authored
Merge pull request #511 from porglezomp-misc/build-script-test-swift-driver
Enable integration tests in build-script-helper.py
2 parents 21af3c7 + 4733a8c commit b7fa6e8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Utilities/build-script-helper.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ def handle_invocation(args):
191191
test_args += ['-Xswiftc', '-enable-testing']
192192
if should_test_parallel():
193193
test_args += ['--parallel']
194+
# The test suite consults these variables to control what tests get run
195+
env['SWIFT_DRIVER_ENABLE_INTEGRATION_TESTS'] = "1"
196+
if args.lit_test_dir:
197+
env['SWIFT_DRIVER_LIT_DIR'] = args.lit_test_dir
194198
swiftpm('test', swift_exec, test_args, env)
195199
elif args.action == 'install':
196200
if platform.system() == 'Darwin':
@@ -578,6 +582,7 @@ def add_common_args(parser):
578582
parser.add_argument('--build-path', metavar='PATH', default='.build', help='build in the given path')
579583
parser.add_argument('--foundation-build-dir', metavar='PATH', help='Path to the Foundation build directory')
580584
parser.add_argument('--dispatch-build-dir', metavar='PATH', help='Path to the Dispatch build directory')
585+
parser.add_argument('--lit-test-dir', metavar='PATH', help='the test dir in the Swift build directory')
581586
parser.add_argument('--configuration', '-c', default='debug', help='build using configuration (release|debug)')
582587
parser.add_argument('--no-local-deps', action='store_true', help='use normal remote dependencies when building')
583588
parser.add_argument('--verbose', '-v', action='store_true', help='enable verbose output')
@@ -616,6 +621,9 @@ def add_common_args(parser):
616621
if args.foundation_build_dir:
617622
args.foundation_build_dir = os.path.abspath(args.foundation_build_dir)
618623

624+
if args.lit_test_dir:
625+
args.lit_test_dir = os.path.abspath(args.lit_test_dir)
626+
619627
# If a separate prefix has not been specified, installed into the specified toolchain
620628
if not args.install_prefixes:
621629
args.install_prefixes = [args.toolchain]

0 commit comments

Comments
 (0)