diff --git a/.travis.yml b/.travis.yml index 20d7f7de3..23ce15900 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,18 @@ matrix: - os: osx env: TYPE=macos osx_image: xcode9 + - os: osx + env: TYPE=macos + osx_image: xcode9.1 + - os: osx + env: TYPE=macos + osx_image: xcode9.2 + - os: osx + env: TYPE=macos + osx_image: xcode9.3 + - os: osx + env: TYPE=macos + osx_image: xcode9.4 - os: osx env: TYPE=swiftpm - os: osx diff --git a/Cartfile.private b/Cartfile.private index 8e95dd603..23d7e1177 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1 +1 @@ -github "mattgallagher/CwlPreconditionTesting" "cb7ab89273cfd0725a7a2f865cc6fc560a9b9083" +github "mattgallagher/CwlPreconditionTesting" "1e62a726d54c743f4585233f08fcaac7307319b5" diff --git a/Cartfile.resolved b/Cartfile.resolved index 3984e096b..32a1c25f8 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ github "mattgallagher/CwlCatchException" "b14c111e9b33cd142bd4bc75c482cfd5c3490923" -github "mattgallagher/CwlPreconditionTesting" "cb7ab89273cfd0725a7a2f865cc6fc560a9b9083" +github "mattgallagher/CwlPreconditionTesting" "1e62a726d54c743f4585233f08fcaac7307319b5" diff --git a/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h b/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h index f9dbedda8..7c50da11b 100644 --- a/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h +++ b/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h @@ -20,6 +20,8 @@ #import +extern bool _swift_reportFatalErrorsToDebugger; + //! Project version number for CwlUtils. FOUNDATION_EXPORT double CwlPreconditionTestingVersionNumber; diff --git a/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Posix/CwlPreconditionTesting_POSIX.h b/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Posix/CwlPreconditionTesting_POSIX.h index 3434a7179..4e28f9514 100644 --- a/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Posix/CwlPreconditionTesting_POSIX.h +++ b/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Posix/CwlPreconditionTesting_POSIX.h @@ -20,6 +20,8 @@ #import +extern bool _swift_reportFatalErrorsToDebugger; + //! Project version number for CwlUtils. FOUNDATION_EXPORT double CwlPreconditionTesting_POSIXVersionNumber; diff --git a/Sources/Nimble/Adapters/NimbleXCTestHandler.swift b/Sources/Nimble/Adapters/NimbleXCTestHandler.swift index 0ad85909b..c8d32adcf 100644 --- a/Sources/Nimble/Adapters/NimbleXCTestHandler.swift +++ b/Sources/Nimble/Adapters/NimbleXCTestHandler.swift @@ -42,12 +42,23 @@ class NimbleXCTestUnavailableHandler: AssertionHandler { private(set) var currentTestCase: XCTestCase? + private var stashed_swift_reportFatalErrorsToDebugger: Bool = false + @objc func testCaseWillStart(_ testCase: XCTestCase) { + #if swift(>=3.2) + stashed_swift_reportFatalErrorsToDebugger = _swift_reportFatalErrorsToDebugger + _swift_reportFatalErrorsToDebugger = false + #endif + currentTestCase = testCase } @objc func testCaseDidFinish(_ testCase: XCTestCase) { currentTestCase = nil + + #if swift(>=3.2) + _swift_reportFatalErrorsToDebugger = stashed_swift_reportFatalErrorsToDebugger + #endif } } #endif