Skip to content

Commit 1e50952

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 c8e9195 commit 1e50952

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
@@ -4411,6 +4411,15 @@ class PackageCommandNativeTests: PackageCommandTestCase {
44114411
override func testNoParameters() async throws {
44124412
try await super.testNoParameters()
44134413
}
4414+
4415+
override func testMigrateCommandWhenDependencyBuildsForHostAndTarget() async throws {
4416+
try XCTSkipOnWindows(
4417+
because: "error: build planning stopped due to build-tool plugin failures",
4418+
skipPlatformCi: true,
4419+
)
4420+
4421+
try await super.testMigrateCommandWhenDependencyBuildsForHostAndTarget()
4422+
}
44144423
}
44154424

44164425
class PackageCommandSwiftBuildTests: PackageCommandTestCase {
@@ -4423,6 +4432,78 @@ class PackageCommandSwiftBuildTests: PackageCommandTestCase {
44234432
try await super.testNoParameters()
44244433
}
44254434

4435+
override func testMigrateCommand() async throws {
4436+
try XCTSkipOnWindows(
4437+
because: """
4438+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4439+
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'
4440+
""",
4441+
skipPlatformCi: true,
4442+
)
4443+
4444+
try await super.testMigrateCommand()
4445+
}
4446+
4447+
override func testMigrateCommandUpdateManifest2Targets() async throws {
4448+
try XCTSkipOnWindows(
4449+
because: """
4450+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4451+
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'
4452+
""",
4453+
skipPlatformCi: true,
4454+
)
4455+
4456+
try await super.testMigrateCommandUpdateManifest2Targets()
4457+
}
4458+
4459+
override func testMigrateCommandUpdateManifestSingleTarget() async throws {
4460+
try XCTSkipOnWindows(
4461+
because: """
4462+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4463+
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'
4464+
""",
4465+
skipPlatformCi: true,
4466+
)
4467+
4468+
try await super.testMigrateCommandUpdateManifestSingleTarget()
4469+
}
4470+
4471+
override func testMigrateCommandUpdateManifestWithErrors() async throws {
4472+
try XCTSkipOnWindows(
4473+
because: """
4474+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4475+
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'
4476+
""",
4477+
skipPlatformCi: true,
4478+
)
4479+
4480+
try await super.testMigrateCommandUpdateManifestWithErrors()
4481+
}
4482+
4483+
override func testMigrateCommandWhenDependencyBuildsForHostAndTarget() async throws {
4484+
try XCTSkipOnWindows(
4485+
because: """
4486+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4487+
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'
4488+
""",
4489+
skipPlatformCi: true,
4490+
)
4491+
4492+
try await super.testMigrateCommandWhenDependencyBuildsForHostAndTarget()
4493+
}
4494+
4495+
override func testMigrateCommandWithBuildToolPlugins() async throws {
4496+
try XCTSkipOnWindows(
4497+
because: """
4498+
Possibly https://github.com/swiftlang/swift-package-manager/issues/8602:
4499+
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'
4500+
""",
4501+
skipPlatformCi: true,
4502+
)
4503+
4504+
try await super.testMigrateCommandWithBuildToolPlugins()
4505+
}
4506+
44264507
override func testCommandPluginSymbolGraphCallbacks() async throws {
44274508
try XCTSkipOnWindows(because: "TSCBasic/Path.swift:969: Assertion failed, https://github.com/swiftlang/swift-package-manager/issues/8602")
44284509
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)