Skip to content

[tests] Add support for running executable tests when SWIFT_INCLUDE_T… #25103

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
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: 13 additions & 7 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,29 @@ function(get_test_dependencies SDK result_var_name)
list(APPEND deps SwiftUnitTests)
endif()

set(deps_binaries
set(deps_binaries)

if (SWIFT_INCLUDE_TOOLS)
list(APPEND deps_binaries
swift swift-ide-test swift-syntax-test sil-opt swift-llvm-opt swift-demangle
sil-func-extractor sil-llvm-gen sil-nm sil-passpipeline-dumper
lldb-moduleimport-test swift-reflection-dump swift-remoteast-test
swift-api-digester swift-refactor swift-demangle-yamldump)

if(SWIFT_BUILD_SYNTAXPARSERLIB)
list(APPEND deps_binaries swift-syntax-parser-test)
endif()
if(SWIFT_BUILD_SOURCEKIT)
list(APPEND deps_binaries sourcekitd-test complete-test)
endif()
endif()

if(NOT SWIFT_BUILT_STANDALONE)
list(APPEND deps_binaries FileCheck arcmt-test c-arcmt-test c-index-test
clang llc llvm-cov llvm-dwarfdump llvm-link llvm-as llvm-dis
llvm-bcanalyzer llvm-nm llvm-readobj llvm-profdata count not
llvm-strings dsymutil)
endif()
if(SWIFT_BUILD_SYNTAXPARSERLIB)
list(APPEND deps_binaries swift-syntax-parser-test)
endif()
if(SWIFT_BUILD_SOURCEKIT)
list(APPEND deps_binaries sourcekitd-test complete-test)
endif()

if(("${SDK}" STREQUAL "IOS") OR
("${SDK}" STREQUAL "TVOS") OR
Expand Down
1 change: 1 addition & 0 deletions test/DebugInfo/ASTSection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %lldb-moduleimport-test -verbose %t/ASTSection | %FileCheck %s

// REQUIRES: executable_test
// REQUIRES: swift_tools_extra

// The test ASTSection_linker.swift builds this code with separate
// compile and link steps.
Expand Down
2 changes: 2 additions & 0 deletions test/IDE/complete_cache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
// Ensure the testable import showed up mangled correctly.
// RUN: ls %t.ccp/Darwin-testable*
// RUN: ls %t.ccp/AppKit-private*

// REQUIRES: executable_test
// REQUIRES: swift_tools_extra

import macros
import ctypes
Expand Down
1 change: 1 addition & 0 deletions test/IDE/print_ast_overlay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// RUN: %FileCheck %s -check-prefix=PASS_ANNOTATED -strict-whitespace < %t.annotated.txt

// REQUIRES: executable_test
// REQUIRES: swift_tools_extra

@_exported import Foo

Expand Down
3 changes: 3 additions & 0 deletions test/lit.site.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ else:
# even if SWIFT_ENABLE_GOLD_LINKER isn't set, we cannot use BFD for Android
config.android_linker_name = "gold"

if '@SWIFT_INCLUDE_TOOLS@' == 'TRUE':
config.available_features.add('swift_tools_extra')

# Let the main config do the real work.
if config.test_exec_root is None:
config.test_exec_root = os.path.dirname(os.path.realpath(__file__))
Expand Down