Skip to content

Commit ed94161

Browse files
committed
Tests: Update test expectation - take 2
Update test expectation for executing SwiftPM tests using the build.ps1 script found in swiftlang/swift/utils/build.ps1. Relates to: swiftlang/swift#80405
1 parent de79f86 commit ed94161

File tree

4 files changed

+93
-6
lines changed

4 files changed

+93
-6
lines changed

Tests/CommandsTests/PackageCommandTests.swift

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4410,6 +4410,15 @@ class PackageCommandNativeTests: PackageCommandTestCase {
44104410
override func testNoParameters() async throws {
44114411
try await super.testNoParameters()
44124412
}
4413+
4414+
override func testMigrateCommandWhenDependencyBuildsForHostAndTarget() async throws {
4415+
try XCTSkipOnWindows(
4416+
because: "error: build planning stopped due to build-tool plugin failures",
4417+
skipPlatformCi: true,
4418+
)
4419+
4420+
try await super.testMigrateCommandWhenDependencyBuildsForHostAndTarget()
4421+
}
44134422
}
44144423

44154424
class PackageCommandSwiftBuildTests: PackageCommandTestCase {
@@ -4422,6 +4431,78 @@ class PackageCommandSwiftBuildTests: PackageCommandTestCase {
44224431
try await super.testNoParameters()
44234432
}
44244433

4434+
override func testMigrateCommand() async throws {
4435+
try XCTSkipOnWindows(
4436+
because: """
4437+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4438+
error: Could not choose a single platform for target 'AllIncludingTests' from the supported platforms 'android qnx webassembly'. Specialization parameters imposed by workspace: platform 'nil' sdkVariant 'nil' supportedPlatforms: 'nil' toolchain: 'nil'
4439+
""",
4440+
skipPlatformCi: true,
4441+
)
4442+
4443+
try await super.testMigrateCommand()
4444+
}
4445+
4446+
override func testMigrateCommandUpdateManifest2Targets() async throws {
4447+
try XCTSkipOnWindows(
4448+
because: """
4449+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4450+
error: Could not choose a single platform for target 'A' from the supported platforms 'android qnx webassembly'. Specialization parameters imposed by workspace: platform 'nil' sdkVariant 'nil' supportedPlatforms: 'nil' toolchain: 'nil'
4451+
""",
4452+
skipPlatformCi: true,
4453+
)
4454+
4455+
try await super.testMigrateCommandUpdateManifest2Targets()
4456+
}
4457+
4458+
override func testMigrateCommandUpdateManifestSingleTarget() async throws {
4459+
try XCTSkipOnWindows(
4460+
because: """
4461+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4462+
error: Could not choose a single platform for target 'A' from the supported platforms 'android qnx webassembly'. Specialization parameters imposed by workspace: platform 'nil' sdkVariant 'nil' supportedPlatforms: 'nil' toolchain: 'nil'
4463+
""",
4464+
skipPlatformCi: true,
4465+
)
4466+
4467+
try await super.testMigrateCommandUpdateManifestSingleTarget()
4468+
}
4469+
4470+
override func testMigrateCommandUpdateManifestWithErrors() async throws {
4471+
try XCTSkipOnWindows(
4472+
because: """
4473+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4474+
error: Could not choose a single platform for target 'A' from the supported platforms 'android qnx webassembly'. Specialization parameters imposed by workspace: platform 'nil' sdkVariant 'nil' supportedPlatforms: 'nil' toolchain: 'nil'
4475+
""",
4476+
skipPlatformCi: true,
4477+
)
4478+
4479+
try await super.testMigrateCommandUpdateManifestWithErrors()
4480+
}
4481+
4482+
override func testMigrateCommandWhenDependencyBuildsForHostAndTarget() async throws {
4483+
try XCTSkipOnWindows(
4484+
because: """
4485+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4486+
error: Could not choose a single platform for target 'A' from the supported platforms 'android qnx webassembly'. Specialization parameters imposed by workspace: platform 'nil' sdkVariant 'nil' supportedPlatforms: 'nil' toolchain: 'nil'
4487+
""",
4488+
skipPlatformCi: true,
4489+
)
4490+
4491+
try await super.testMigrateCommandWhenDependencyBuildsForHostAndTarget()
4492+
}
4493+
4494+
override func testMigrateCommandWithBuildToolPlugins() async throws {
4495+
try XCTSkipOnWindows(
4496+
because: """
4497+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4498+
error: Could not choose a single platform for target 'A' from the supported platforms 'android qnx webassembly'. Specialization parameters imposed by workspace: platform 'nil' sdkVariant 'nil' supportedPlatforms: 'nil' toolchain: 'nil'
4499+
""",
4500+
skipPlatformCi: true,
4501+
)
4502+
4503+
try await super.testMigrateCommandWithBuildToolPlugins()
4504+
}
4505+
44254506
override func testCommandPluginSymbolGraphCallbacks() async throws {
44264507
try XCTSkipOnWindows(because: "TSCBasic/Path.swift:969: Assertion failed, https://github.com/swiftlang/swift-package-manager/issues/8602")
44274508
try await super.testCommandPluginSymbolGraphCallbacks()

Tests/CommandsTests/RunCommandTests.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,9 @@ struct RunCommandTests {
399399
}
400400

401401
@Test(
402-
.bug("https://github.com/swiftlang/swift-package-manager/issues/8844"),
402+
.issue("https://github.com/swiftlang/swift-package-manager/issues/8844", relationship: .verifies),
403+
.issue("https://github.com/swiftlang/swift-package-manager/issues/8911", relationship: .defect),
404+
.issue("https://github.com/swiftlang/swift-package-manager/issues/8912", relationship: .defect),
403405
arguments: SupportedBuildSystemOnPlatform, BuildConfiguration.allCases
404406
)
405407
func swiftRunQuietLogLevel(
@@ -423,9 +425,12 @@ struct RunCommandTests {
423425
#expect(stdout == "done\n")
424426
}
425427
} when: {
426-
ProcessInfo.hostOperatingSystem == .linux &&
427-
buildSystem == .swiftbuild &&
428-
CiEnvironment.runningInSelfHostedPipeline
428+
(
429+
ProcessInfo.hostOperatingSystem == .linux &&
430+
buildSystem == .swiftbuild &&
431+
CiEnvironment.runningInSelfHostedPipeline
432+
)
433+
|| (CiEnvironment.runningInSmokeTestPipeline && ProcessInfo.hostOperatingSystem == .windows)
429434
}
430435
}
431436

Tests/CommandsTests/TestCommandTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ struct TestCommandTests {
243243
}
244244
} when: {
245245
(buildSystem == .swiftbuild && .linux == ProcessInfo.hostOperatingSystem)
246-
|| (buildSystem == .swiftbuild && .windows == ProcessInfo.hostOperatingSystem && CiEnvironment.runningInSelfHostedPipeline)
246+
// || (buildSystem == .swiftbuild && .windows == ProcessInfo.hostOperatingSystem && CiEnvironment.runningInSelfHostedPipeline)
247+
|| (buildSystem == .swiftbuild && .windows == ProcessInfo.hostOperatingSystem )
247248
}
248249
}
249250

Tests/PackageLoadingTests/PD_6_2_LoadingTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ struct PackageDescription6_2LoadingTests {
8686
results.checkIsEmpty()
8787
}
8888
} when: {
89-
isWindows
89+
isWindows && !CiEnvironment.runningInSmokeTestPipeline
9090
}
9191
}
9292
}

0 commit comments

Comments
 (0)