Skip to content

Commit 4dc0298

Browse files
committed
some updates - test requires correctly setting SWIFTPM_CUSTOM_BIN_DIR env var to have IntegrationTets pass
1 parent e512ea9 commit 4dc0298

File tree

7 files changed

+10
-129
lines changed

7 files changed

+10
-129
lines changed

Package.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@ let package = Package(
798798
/** SwiftPM internal test suite support library */
799799
name: "_IntegrationTestSupport",
800800
dependencies: [
801+
"_InternalTestSupport",
801802
.product(name: "TSCTestSupport", package: "swift-tools-support-core"),
802803
]
803804
),
@@ -1005,6 +1006,7 @@ if ProcessInfo.processInfo.environment["SWIFTCI_DISABLE_SDK_DEPENDENT_TESTS"] ==
10051006
name: "IntegrationTests",
10061007
dependencies: [
10071008
"_IntegrationTestSupport",
1009+
"_InternalTestSupport",
10081010
.product(name: "TSCTestSupport", package: "swift-tools-support-core"),
10091011
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
10101012
]

Sources/_IntegrationTestSupport/Process.swift

Lines changed: 0 additions & 43 deletions
This file was deleted.

Sources/_IntegrationTestSupport/SkippedTestSupport.swift

Lines changed: 0 additions & 70 deletions
This file was deleted.

Sources/_IntegrationTestSupport/StringChecker.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
import Foundation
1212
import TSCTestSupport
13+
import _InternalTestSupport
14+
1315
public class StringChecker {
1416
private let string: String
1517
private let lines: [Substring]

Tests/IntegrationTests/BasicTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import Foundation
1212
import _IntegrationTestSupport
13+
import _InternalTestSupport
1314
import Testing
1415
import TSCBasic
1516
import TSCTestSupport

Tests/IntegrationTests/SwiftPMTests.swift

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import Foundation
1212
import _IntegrationTestSupport
13+
import _InternalTestSupport
1314
import Testing
1415
import TSCBasic
1516
import TSCTestSupport
@@ -75,15 +76,6 @@ private struct SwiftPMTests {
7576
}
7677

7778
@Test(
78-
.requireThreadSafeWorkingDirectory,
79-
arguments: [BuildSystemProvider.native]
80-
)
81-
func packageInitExecutable(_ buildSystemProvider: BuildSystemProvider) throws {
82-
try _packageInitExecutable(buildSystemProvider)
83-
}
84-
85-
@Test(
86-
.skipHostOS(.windows),
8779
.requireThreadSafeWorkingDirectory,
8880
.bug(
8981
"https://github.com/swiftlang/swift-package-manager/issues/8416",
@@ -93,13 +85,9 @@ private struct SwiftPMTests {
9385
"https://github.com/swiftlang/swift-package-manager/issues/8514",
9486
"[Windows] Integration test SwiftPMTests.packageInitExecutable with --build-system swiftbuild is skipped"
9587
),
96-
arguments: [BuildSystemProvider.swiftbuild]
88+
arguments: BuildSystemProvider.allCases
9789
)
98-
func packageInitExecutablSkipWindows(_ buildSystemProvider: BuildSystemProvider) throws {
99-
try _packageInitExecutable(buildSystemProvider)
100-
}
101-
102-
private func _packageInitExecutable(_ buildSystemProvider: BuildSystemProvider) throws {
90+
func packageInitExecutable(_ buildSystemProvider: BuildSystemProvider) throws {
10391
try withTemporaryDirectory { tmpDir in
10492
let packagePath = tmpDir.appending(component: "foo")
10593
try localFileSystem.createDirectory(packagePath)
@@ -119,7 +107,7 @@ private struct SwiftPMTests {
119107
#expect(!runOutput.stderr.contains("error:"))
120108
#expect(runOutput.stdout.contains("Hello, world!"))
121109
} when: {
122-
buildSystemProvider == .swiftbuild && ProcessInfo.hostOperatingSystem == .linux
110+
buildSystemProvider == .swiftbuild && [OperatingSystem.linux, .windows].contains(ProcessInfo.hostOperatingSystem)
123111
}
124112
}
125113
}

Tests/IntegrationTests/XCBuildTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import TSCBasic
1212
import TSCTestSupport
1313
import _IntegrationTestSupport
14+
import _InternalTestSupport
1415
import Testing
1516

1617
@Suite

0 commit comments

Comments
 (0)