Skip to content

Commit 50943bf

Browse files
committed
[Build Script Helper] Add a --lit-test-dir flag
1 parent b02d8a8 commit 50943bf

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
@@ -192,6 +192,8 @@ def handle_invocation(args):
192192
if should_test_parallel():
193193
test_args += ['--parallel']
194194
env['SWIFT_DRIVER_ENABLE_INTEGRATION_TESTS'] = "1"
195+
if args.lit_test_dir:
196+
env['SWIFT_DRIVER_LIT_DIR'] = args.lit_test_dir
195197
swiftpm('test', swift_exec, test_args, env)
196198
elif args.action == 'install':
197199
if platform.system() == 'Darwin':
@@ -579,6 +581,7 @@ def add_common_args(parser):
579581
parser.add_argument('--build-path', metavar='PATH', default='.build', help='build in the given path')
580582
parser.add_argument('--foundation-build-dir', metavar='PATH', help='Path to the Foundation build directory')
581583
parser.add_argument('--dispatch-build-dir', metavar='PATH', help='Path to the Dispatch build directory')
584+
parser.add_argument('--lit-test-dir', metavar='PATH', help='the test dir in the Swift build directory')
582585
parser.add_argument('--configuration', '-c', default='debug', help='build using configuration (release|debug)')
583586
parser.add_argument('--no-local-deps', action='store_true', help='use normal remote dependencies when building')
584587
parser.add_argument('--verbose', '-v', action='store_true', help='enable verbose output')
@@ -617,6 +620,9 @@ def add_common_args(parser):
617620
if args.foundation_build_dir:
618621
args.foundation_build_dir = os.path.abspath(args.foundation_build_dir)
619622

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

0 commit comments

Comments
 (0)