mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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.
This commit is contained in:
10
test/lit.cfg
10
test/lit.cfg
@@ -2186,6 +2186,13 @@ config.substitutions.append(('%raw-FileCheck', shell_quote(config.filecheck)))
|
|||||||
config.substitutions.append(('%import-libdispatch', getattr(config, 'import_libdispatch', '')))
|
config.substitutions.append(('%import-libdispatch', getattr(config, 'import_libdispatch', '')))
|
||||||
config.substitutions.append(('%import-static-libdispatch', getattr(config, 'import_libdispatch_static', '')))
|
config.substitutions.append(('%import-static-libdispatch', getattr(config, 'import_libdispatch_static', '')))
|
||||||
|
|
||||||
|
# Disabe COW sanity checks in the swift runtime by default.
|
||||||
|
# (But it's required to set this environment variable to something)
|
||||||
|
config.environment['SWIFT_DEBUG_ENABLE_COW_CHECKS'] = 'false'
|
||||||
|
|
||||||
|
# Add this to the command which runs an executable to enable COW checks in the swift runtime.
|
||||||
|
config.substitutions.append(('%enable-cow-checking', TARGET_ENV_PREFIX + 'SWIFT_DEBUG_ENABLE_COW_CHECKS=true;'))
|
||||||
|
|
||||||
if config.lldb_build_root != "":
|
if config.lldb_build_root != "":
|
||||||
lldb_python_path = get_lldb_python_path(config.lldb_build_root)
|
lldb_python_path = get_lldb_python_path(config.lldb_build_root)
|
||||||
lldb_python_interpreter = get_lldb_python_interpreter(config.lldb_build_root)
|
lldb_python_interpreter = get_lldb_python_interpreter(config.lldb_build_root)
|
||||||
@@ -2210,9 +2217,6 @@ config.environment[TARGET_ENV_PREFIX + 'SWIFT_DETERMINISTIC_HASHING'] = '1'
|
|||||||
# Enable malloc scribble during tests by default.
|
# Enable malloc scribble during tests by default.
|
||||||
config.environment[TARGET_ENV_PREFIX + 'SWIFT_DEBUG_ENABLE_MALLOC_SCRIBBLE'] = 'YES'
|
config.environment[TARGET_ENV_PREFIX + 'SWIFT_DEBUG_ENABLE_MALLOC_SCRIBBLE'] = 'YES'
|
||||||
|
|
||||||
# Enable COW sanity checks in the swift runtime by default.
|
|
||||||
config.environment['SWIFT_DEBUG_ENABLE_COW_CHECKS'] = 'true'
|
|
||||||
|
|
||||||
# Run lsb_release on the target to be tested and return the results.
|
# Run lsb_release on the target to be tested and return the results.
|
||||||
def linux_get_lsb_release():
|
def linux_get_lsb_release():
|
||||||
lsb_release_path = '/usr/bin/lsb_release'
|
lsb_release_path = '/usr/bin/lsb_release'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %target-run-simple-swiftgyb
|
// RUN: %enable-cow-checking %target-run-simple-swiftgyb
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
|
|
||||||
import StdlibUnittest
|
import StdlibUnittest
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
// Do Not Edit Directly!
|
// Do Not Edit Directly!
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %target-run-simple-swift
|
// RUN: %enable-cow-checking %target-run-simple-swift
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
// REQUIRES: optimized_stdlib
|
// REQUIRES: optimized_stdlib
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
// RUN: %target-clang -fobjc-arc %S/Inputs/SlurpFastEnumeration/SlurpFastEnumeration.m -c -o %t/SlurpFastEnumeration.o
|
// RUN: %target-clang -fobjc-arc %S/Inputs/SlurpFastEnumeration/SlurpFastEnumeration.m -c -o %t/SlurpFastEnumeration.o
|
||||||
// RUN: %line-directive %t/main.swift -- %target-build-swift %t/main.swift %S/Inputs/DictionaryKeyValueTypes.swift -I %S/Inputs/SlurpFastEnumeration/ -Xlinker %t/SlurpFastEnumeration.o -o %t/Arrays -Xfrontend -disable-access-control
|
// RUN: %line-directive %t/main.swift -- %target-build-swift %t/main.swift %S/Inputs/DictionaryKeyValueTypes.swift -I %S/Inputs/SlurpFastEnumeration/ -Xlinker %t/SlurpFastEnumeration.o -o %t/Arrays -Xfrontend -disable-access-control
|
||||||
//
|
//
|
||||||
// RUN: %target-codesign %t/Arrays && %line-directive %t/main.swift -- %target-run %t/Arrays
|
// RUN: %target-codesign %t/Arrays
|
||||||
|
// RUN: %enable-cow-checking %line-directive %t/main.swift -- %target-run %t/Arrays
|
||||||
// REQUIRES: executable_test
|
// REQUIRES: executable_test
|
||||||
|
|
||||||
import Swift
|
import Swift
|
||||||
|
|||||||
Reference in New Issue
Block a user