Skip to content

Commit 4733a8c

Browse files
committed
[Build Script Helper] Add a --lit-test-dir flag
1 parent aa65cf3 commit 4733a8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Utilities/build-script-helper.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ def handle_invocation(args):
193193
test_args += ['--parallel']
194194
# The test suite consults these variables to control what tests get run
195195
env['SWIFT_DRIVER_ENABLE_INTEGRATION_TESTS'] = "1"
196+
if args.lit_test_dir:
197+
env['SWIFT_DRIVER_LIT_DIR'] = args.lit_test_dir
196198
swiftpm('test', swift_exec, test_args, env)
197199
elif args.action == 'install':
198200
if platform.system() == 'Darwin':
@@ -580,6 +582,7 @@ def add_common_args(parser):
580582
parser.add_argument('--build-path', metavar='PATH', default='.build', help='build in the given path')
581583
parser.add_argument('--foundation-build-dir', metavar='PATH', help='Path to the Foundation build directory')
582584
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')
583586
parser.add_argument('--configuration', '-c', default='debug', help='build using configuration (release|debug)')
584587
parser.add_argument('--no-local-deps', action='store_true', help='use normal remote dependencies when building')
585588
parser.add_argument('--verbose', '-v', action='store_true', help='enable verbose output')
@@ -618,6 +621,9 @@ def add_common_args(parser):
618621
if args.foundation_build_dir:
619622
args.foundation_build_dir = os.path.abspath(args.foundation_build_dir)
620623

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

0 commit comments

Comments
 (0)