Skip to content

Commit c13e531

Browse files
eecksteinshahmishal
authored andcommitted
tests: disable COW checking by default, and enable it for specific tests
COW checking needs that all libraries are consistently compiled with asserts enabled. This is not the case for the Foundation overlay anymore. Therefore it does not work with some tests which interop with Foundation. The solution here is to disable COW checking by default, but enable it for Array tests which do not interop with Foundation. (cherry picked from commit 0831240)
1 parent 96e0cb4 commit c13e531

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/lit.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,6 +2135,13 @@ config.environment['SWIFT_DEBUG_ENABLE_COW_CHECKS'] = 'false'
21352135
# Add this to the command which runs an executable to enable COW checks in the swift runtime.
21362136
config.substitutions.append(('%enable-cow-checking', TARGET_ENV_PREFIX + 'SWIFT_DEBUG_ENABLE_COW_CHECKS=true;'))
21372137

2138+
# Disabe COW sanity checks in the swift runtime by default.
2139+
# (But it's required to set this environment variable to something)
2140+
config.environment['SWIFT_DEBUG_ENABLE_COW_CHECKS'] = 'false'
2141+
2142+
# Add this to the command which runs an executable to enable COW checks in the swift runtime.
2143+
config.substitutions.append(('%enable-cow-checking', TARGET_ENV_PREFIX + 'SWIFT_DEBUG_ENABLE_COW_CHECKS=true;'))
2144+
21382145
if config.lldb_build_root != "":
21392146
lldb_python_path = get_lldb_python_path(config.lldb_build_root)
21402147
lldb_python_interpreter = get_lldb_python_interpreter(config.lldb_build_root)

0 commit comments

Comments
 (0)