Skip to content

Commit d173abe

Browse files
committedMar 20, 2025
Move integration tests to use swift-testing
* Move all 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.
1 parent 19ce521 commit d173abe

File tree

10 files changed

+794
-502
lines changed

10 files changed

+794
-502
lines changed
 

Diff for: ‎IntegrationTests/Package.swift

+14-4
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

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)