File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -548,7 +548,7 @@ let package = Package(
548
548
) ,
549
549
. testTarget(
550
550
name: " BuildTests " ,
551
- dependencies: [ " Build " , " SPMTestSupport " ]
551
+ dependencies: [ " Build " , " PackageModel " , " SPMTestSupport " ]
552
552
) ,
553
553
. testTarget(
554
554
name: " WorkspaceTests " ,
Original file line number Diff line number Diff line change @@ -110,4 +110,9 @@ extension UserToolchain {
110
110
return false
111
111
}
112
112
}
113
+
114
+ /// Helper function to determine whether we should run SDK-dependent tests.
115
+ public func supportsSDKDependentTests( ) -> Bool {
116
+ return ProcessInfo . processInfo. environment [ " SWIFTCI_DISABLE_SDK_DEPENDENT_TESTS " ] == nil
117
+ }
113
118
}
Original file line number Diff line number Diff line change 11
11
//===----------------------------------------------------------------------===//
12
12
13
13
import Basics
14
+ import PackageModel
14
15
import SPMTestSupport
15
16
import XCTest
16
17
@@ -36,6 +37,7 @@ import XCTest
36
37
final class IncrementalBuildTests : XCTestCase {
37
38
38
39
func testIncrementalSingleModuleCLibraryInSources( ) throws {
40
+ try XCTSkipIf ( !UserToolchain. default. supportsSDKDependentTests ( ) , " skipping because test environment doesn't support this test " )
39
41
try fixture ( name: " CFamilyTargets/CLibrarySources " ) { fixturePath in
40
42
// Build it once and capture the log (this will be a full build).
41
43
let ( fullLog, _) = try executeSwiftBuild ( fixturePath)
@@ -93,6 +95,7 @@ final class IncrementalBuildTests: XCTestCase {
93
95
}
94
96
95
97
func testBuildManifestCaching( ) throws {
98
+ try XCTSkipIf ( !UserToolchain. default. supportsSDKDependentTests ( ) , " skipping because test environment doesn't support this test " )
96
99
try fixture ( name: " ValidLayouts/SingleModule/Library " ) { fixturePath in
97
100
@discardableResult
98
101
func build( ) throws -> String {
@@ -126,6 +129,7 @@ final class IncrementalBuildTests: XCTestCase {
126
129
}
127
130
128
131
func testDisableBuildManifestCaching( ) throws {
132
+ try XCTSkipIf ( !UserToolchain. default. supportsSDKDependentTests ( ) , " skipping because test environment doesn't support this test " )
129
133
try fixture ( name: " ValidLayouts/SingleModule/Library " ) { fixturePath in
130
134
@discardableResult
131
135
func build( ) throws -> String {
You can’t perform that action at this time.
0 commit comments