Skip to content

Commit 7dc497c

Browse files
authored
Merge pull request #25103 from gottesmm/pr-f84811812599fd979ceedad733e34a66ca2d6d9d
[tests] Add support for running executable tests when SWIFT_INCLUDE_T…
2 parents cfb8d1b + 8284379 commit 7dc497c

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

test/CMakeLists.txt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,29 @@ function(get_test_dependencies SDK result_var_name)
3939
list(APPEND deps SwiftUnitTests)
4040
endif()
4141

42-
set(deps_binaries
42+
set(deps_binaries)
43+
44+
if (SWIFT_INCLUDE_TOOLS)
45+
list(APPEND deps_binaries
4346
swift swift-ide-test swift-syntax-test sil-opt swift-llvm-opt swift-demangle
4447
sil-func-extractor sil-llvm-gen sil-nm sil-passpipeline-dumper
4548
lldb-moduleimport-test swift-reflection-dump swift-remoteast-test
4649
swift-api-digester swift-refactor swift-demangle-yamldump)
50+
51+
if(SWIFT_BUILD_SYNTAXPARSERLIB)
52+
list(APPEND deps_binaries swift-syntax-parser-test)
53+
endif()
54+
if(SWIFT_BUILD_SOURCEKIT)
55+
list(APPEND deps_binaries sourcekitd-test complete-test)
56+
endif()
57+
endif()
58+
4759
if(NOT SWIFT_BUILT_STANDALONE)
4860
list(APPEND deps_binaries FileCheck arcmt-test c-arcmt-test c-index-test
4961
clang llc llvm-cov llvm-dwarfdump llvm-link llvm-as llvm-dis
5062
llvm-bcanalyzer llvm-nm llvm-readobj llvm-profdata count not
5163
llvm-strings dsymutil)
5264
endif()
53-
if(SWIFT_BUILD_SYNTAXPARSERLIB)
54-
list(APPEND deps_binaries swift-syntax-parser-test)
55-
endif()
56-
if(SWIFT_BUILD_SOURCEKIT)
57-
list(APPEND deps_binaries sourcekitd-test complete-test)
58-
endif()
5965

6066
if(("${SDK}" STREQUAL "IOS") OR
6167
("${SDK}" STREQUAL "TVOS") OR

test/DebugInfo/ASTSection.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: %lldb-moduleimport-test -verbose %t/ASTSection | %FileCheck %s
55

66
// REQUIRES: executable_test
7+
// REQUIRES: swift_tools_extra
78

89
// The test ASTSection_linker.swift builds this code with separate
910
// compile and link steps.

test/IDE/complete_cache.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
// Ensure the testable import showed up mangled correctly.
4848
// RUN: ls %t.ccp/Darwin-testable*
4949
// RUN: ls %t.ccp/AppKit-private*
50+
5051
// REQUIRES: executable_test
52+
// REQUIRES: swift_tools_extra
5153

5254
import macros
5355
import ctypes

test/IDE/print_ast_overlay.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// RUN: %FileCheck %s -check-prefix=PASS_ANNOTATED -strict-whitespace < %t.annotated.txt
1313

1414
// REQUIRES: executable_test
15+
// REQUIRES: swift_tools_extra
1516

1617
@_exported import Foo
1718

test/lit.site.cfg.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ else:
112112
# even if SWIFT_ENABLE_GOLD_LINKER isn't set, we cannot use BFD for Android
113113
config.android_linker_name = "gold"
114114

115+
if '@SWIFT_INCLUDE_TOOLS@' == 'TRUE':
116+
config.available_features.add('swift_tools_extra')
117+
115118
# Let the main config do the real work.
116119
if config.test_exec_root is None:
117120
config.test_exec_root = os.path.dirname(os.path.realpath(__file__))

0 commit comments

Comments
 (0)