Skip to content

Commit 6c179de

Browse files
authored
Move integration tests to use swift-testing (#8396)
- Move all integration tests to use swift-testing - Add some test skipping traits for OS types, Xcode etc. - Create a common test module - Move the helpers from test source to common test module. - TSCBasic requires a minimum os of 10.3, force produce to 13.0 - Update the IntegrationTests sub package to use the common test module. - Remove XCTest macros from within the StringChecker for #expect usage. - Run swift-format on all files
1 parent db9fef2 commit 6c179de

File tree

10 files changed

+792
-468
lines changed

10 files changed

+792
-468
lines changed

IntegrationTests/Package.swift

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,21 @@ import PackageDescription
44

55
let package = Package(
66
name: "IntegrationTests",
7+
platforms: [.macOS("13.0")],
78
targets: [
8-
.testTarget(name: "IntegrationTests", dependencies: [
9-
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
10-
.product(name: "TSCTestSupport", package: "swift-tools-support-core")
11-
]),
9+
.testTarget(
10+
name: "IntegrationTests",
11+
dependencies: [
12+
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
13+
.product(name: "TSCTestSupport", package: "swift-tools-support-core"),
14+
"IntegrationTestSupport",
15+
]),
16+
.target(
17+
name: "IntegrationTestSupport",
18+
dependencies: [
19+
.product(name: "TSCTestSupport", package: "swift-tools-support-core"),
20+
]
21+
),
1222
]
1323
)
1424

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
This source file is part of the Swift.org open source project
3+
4+
Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors
5+
Licensed under Apache License v2.0 with Runtime Library Exception
6+
7+
See http://swift.org/LICENSE.txt for license information
8+
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
9+
*/
10+
11+
import TSCBasic
12+
13+
extension FileSystem {
14+
// Returns true if a path does not exist. Makes #expect statements more obvious.
15+
public func notExists(_ path: AbsolutePath, followSymlink: Bool = false) -> Bool {
16+
!exists(path, followSymlink: followSymlink)
17+
}
18+
}

0 commit comments

Comments
 (0)