Skip to content

Enable integration tests in build-script-helper.py #511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Utilities/build-script-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ def handle_invocation(args):
test_args += ['-Xswiftc', '-enable-testing']
if should_test_parallel():
test_args += ['--parallel']
# The test suite consults these variables to control what tests get run
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(optional) The comment could expand on why in this situation it's ok to opt in into those tests (basically the first part of the PR description)

env['SWIFT_DRIVER_ENABLE_INTEGRATION_TESTS'] = "1"
if args.lit_test_dir:
env['SWIFT_DRIVER_LIT_DIR'] = args.lit_test_dir
swiftpm('test', swift_exec, test_args, env)
elif args.action == 'install':
if platform.system() == 'Darwin':
Expand Down Expand Up @@ -578,6 +582,7 @@ def add_common_args(parser):
parser.add_argument('--build-path', metavar='PATH', default='.build', help='build in the given path')
parser.add_argument('--foundation-build-dir', metavar='PATH', help='Path to the Foundation build directory')
parser.add_argument('--dispatch-build-dir', metavar='PATH', help='Path to the Dispatch build directory')
parser.add_argument('--lit-test-dir', metavar='PATH', help='the test dir in the Swift build directory')
parser.add_argument('--configuration', '-c', default='debug', help='build using configuration (release|debug)')
parser.add_argument('--no-local-deps', action='store_true', help='use normal remote dependencies when building')
parser.add_argument('--verbose', '-v', action='store_true', help='enable verbose output')
Expand Down Expand Up @@ -616,6 +621,9 @@ def add_common_args(parser):
if args.foundation_build_dir:
args.foundation_build_dir = os.path.abspath(args.foundation_build_dir)

if args.lit_test_dir:
args.lit_test_dir = os.path.abspath(args.lit_test_dir)

# If a separate prefix has not been specified, installed into the specified toolchain
if not args.install_prefixes:
args.install_prefixes = [args.toolchain]
Expand Down