Skip to content
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

[build-script] Add sanitizer options to sourcekit-lsp #31015

Merged
merged 1 commit into from
Apr 28, 2020
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
20 changes: 18 additions & 2 deletions utils/build-presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1712,18 +1712,34 @@ install-swiftevolve
# Test SourceKit-LSP
#===------------------------------------------------------------------------===#

[preset: buildbot_sourcekitlsp_macos]
[preset: buildbot_sourcekitlsp_macos,no_sanitize]
mixin-preset=mixin_swiftpm_package_macos_platform
release
assertions
sourcekit-lsp

[preset: buildbot_sourcekitlsp_linux]
[preset: buildbot_sourcekitlsp_linux,no_sanitize]
mixin-preset=mixin_swiftpm_package_linux_platform
release
assertions
sourcekit-lsp

[preset: buildbot_sourcekitlsp_macos,sanitize]
mixin-preset=buildbot_sourcekitlsp_macos,no_sanitize
test-sourcekit-lsp-sanitize-all

[preset: buildbot_sourcekitlsp_linux,sanitize]
mixin-preset=buildbot_sourcekitlsp_linux,no_sanitize
test-sourcekit-lsp-sanitize-all

# Default: no sanitizers
[preset: buildbot_sourcekitlsp_macos]
mixin-preset=buildbot_sourcekitlsp_macos,no_sanitize

# Default: no sanitizers
[preset: buildbot_sourcekitlsp_linux]
mixin-preset=buildbot_sourcekitlsp_linux,no_sanitize

#===------------------------------------------------------------------------===#
# Test IndexStore-DB
#===------------------------------------------------------------------------===#
Expand Down
3 changes: 3 additions & 0 deletions utils/build_swift/build_swift/driver_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,9 @@ def create_argument_parser():
help='run indexstore-db tests under all sanitizers')
option(['--sourcekit-lsp'], toggle_true('build_sourcekitlsp'),
help='build SourceKitLSP')
option('--test-sourcekit-lsp-sanitize-all',
toggle_true('test_sourcekitlsp_sanitize_all'),
help='run sourcekit-lsp tests under all sanitizers')
option('--install-swiftsyntax', toggle_true('install_swiftsyntax'),
help='install SwiftSyntax')
option('--swiftsyntax-verify-generated-files',
Expand Down
3 changes: 3 additions & 0 deletions utils/build_swift/tests/expected_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
'build_swiftevolve': False,
'build_indexstoredb': False,
'test_indexstoredb_sanitize_all': False,
'test_sourcekitlsp_sanitize_all': False,
'build_sourcekitlsp': False,
'install_swiftpm': False,
'install_swiftsyntax': False,
Expand Down Expand Up @@ -507,6 +508,8 @@ class BuildScriptImplOption(_BaseOption):
EnableOption('--test-indexstore-db-sanitize-all',
dest='test_indexstoredb_sanitize_all'),
EnableOption('--sourcekit-lsp', dest='build_sourcekitlsp'),
EnableOption('--test-sourcekit-lsp-sanitize-all',
dest='test_sourcekitlsp_sanitize_all'),
EnableOption('--install-swiftsyntax', dest='install_swiftsyntax'),
EnableOption('--swiftsyntax-verify-generated-files',
dest='swiftsyntax_verify_generated_files'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def should_test(self, host_target):

def test(self, host_target):
indexstoredb.run_build_script_helper(
'test', host_target, self, self.args)
'test', host_target, self, self.args,
self.args.test_sourcekitlsp_sanitize_all)

def should_install(self, host_target):
return self.args.install_sourcekitlsp
Expand Down