Skip to content

[build-script] Add a preset for building the stdlib against a swift.o… #25078

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 1 commit into from
May 29, 2019
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions utils/build-script
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ class HostSpecificConfiguration(object):
if test:
if test_host_only:
suffix = "-only_non_executable"
elif args.only_executable_test:
suffix = "-only_executable"
else:
suffix = ""
subset_suffix = ""
Expand Down Expand Up @@ -730,6 +732,8 @@ class BuildScriptInvocation(object):
impl_args += ["--long-test"]
if args.stress_test:
impl_args += ["--stress-test"]
if args.only_executable_test:
impl_args += ["--only-executable-test"]
if not args.benchmark:
impl_args += ["--skip-test-benchmarks"]
if not args.test_optimized:
Expand Down
3 changes: 3 additions & 0 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ KNOWN_SETTINGS=(
skip-test-optimize-none-implicit-dynamic "" "set to skip testing the test suite in optimize none with implicit dynamic mode"
skip-test-sourcekit "" "set to skip testing SourceKit"
stress-test-sourcekit "" "set to run the stress-SourceKit target"
only-executable-test "" "only run the executable variant of the swift lit tests"
workspace "${HOME}/src" "source directory containing llvm, clang, swift"
enable-llvm-assertions "1" "set to enable llvm assertions"
build-llvm "1" "set to 1 to build LLVM and Clang"
Expand Down Expand Up @@ -1482,6 +1483,8 @@ function calculate_targets_for_host() {
test_target_suffix=""
if [[ -n "${test_host_only}" ]] ; then
test_target_suffix="-only_non_executable"
elif [[ -n "${ONLY_EXECUTABLE_TEST}" ]] ; then
test_target_suffix="-only_executable"
fi

test_subset_target_suffix=""
Expand Down
4 changes: 4 additions & 0 deletions utils/build_swift/driver_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,10 @@ def create_argument_parser():
option('--host-test', toggle_true,
help='run executable tests on host devices (such as iOS or tvOS)')

option('--only-executable-test', toggle_true,
help='Only run executable tests. Does nothing if host-test is not '
'allowed')

option('--test-paths', append,
type=argparse.ShellSplitType(),
help='run tests located in specific directories and/or files '
Expand Down
2 changes: 2 additions & 0 deletions utils/build_swift/tests/expected_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
'host_lipo': None,
'host_target': targets.StdlibDeploymentTarget.host_target().name,
'host_test': False,
'only_executable_test': False,
'install_prefix': targets.install_prefix(),
'install_symroot': None,
'install_destdir': None,
Expand Down Expand Up @@ -450,6 +451,7 @@ class IgnoreOption(_BaseOption):
EnableOption('--export-compile-commands'),
EnableOption('--foundation', dest='build_foundation'),
EnableOption('--host-test'),
EnableOption('--only-executable-test'),
EnableOption('--libdispatch', dest='build_libdispatch'),
EnableOption('--libicu', dest='build_libicu'),
EnableOption('--indexstore-db', dest='build_indexstoredb'),
Expand Down