Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Tests/CommandsTests/BuildCommandTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ struct BuildCommandTestCases {
data: BuildData,
) async throws {
let buildSystem = data.buildSystem
try await withKnownIssue {
try await withKnownIssue(isIntermittent: true) {
try await fixture(name: "Miscellaneous/LibraryEvolution") { fixturePath in
let result = try await build(
[],
Expand Down Expand Up @@ -1469,7 +1469,7 @@ struct BuildCommandTestCases {
"""
Windows: Sometimes failed to build due to a possible path issue
All: --very-verbose causes rebuild on SwiftBuild (https://github.com/swiftlang/swift-package-manager/issues/9299)
""",
""",
isIntermittent: true) {
try await fixture(name: "ValidLayouts/SingleModule/ExecutableNew") { fixturePath in
_ = try await build(
Expand Down Expand Up @@ -1571,7 +1571,7 @@ struct BuildCommandTestCases {
) async throws {
let buildSystem = data.buildSystem
let configuration = data.config
try await withKnownIssue {
try await withKnownIssue(isIntermittent: true) {
// GIVEN we have a simple test package
try await fixture(name: "Miscellaneous/SwiftBuild") { fixturePath in
//WHEN we build with the --quiet option
Expand Down
19 changes: 16 additions & 3 deletions Tests/CommandsTests/PackageCommandTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4136,6 +4136,7 @@ struct PackageCommandTests {
"https://github.com/swiftlang/swift-package-manager/issues/9006",
relationship: .defect
),
.IssueWindowsCannotSaveAttachment,
arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms),
[
// When updating these, make sure we keep testing both the singular and
Expand All @@ -4160,7 +4161,7 @@ struct PackageCommandTests {
) async throws {
let featureName = testData.featureName
let expectedSummary = testData.expectedSummary

try await withKnownIssue(isIntermittent: true) {
try await fixture(name: "SwiftMigrate/\(featureName)Migration") { fixturePath in
let sourcePaths: [AbsolutePath]
let fixedSourcePaths: [AbsolutePath]
Expand Down Expand Up @@ -4201,6 +4202,9 @@ struct PackageCommandTests {
let regexMatch = try Regex("> \(expectedSummary)" + #" \([0-9]\.[0-9]{1,3}s\)"#)
#expect(stdout.contains(regexMatch))
}
} when: {
ProcessInfo.hostOperatingSystem == .windows && buildData.buildSystem == .swiftbuild
}
}

@Test(
Expand All @@ -4214,6 +4218,7 @@ struct PackageCommandTests {
func migrateCommandWithBuildToolPlugins(
data: BuildData,
) async throws {
try await withKnownIssue(isIntermittent: true) {
try await fixture(name: "SwiftMigrate/ExistentialAnyWithPluginMigration") { fixturePath in
let (stdout, _) = try await execute(
["migrate", "--to-feature", "ExistentialAny"],
Expand All @@ -4239,6 +4244,9 @@ struct PackageCommandTests {
)
#expect(stdout.contains(regexMatch))
}
} when: {
ProcessInfo.hostOperatingSystem == .windows
}
}

@Test(
Expand All @@ -4247,11 +4255,13 @@ struct PackageCommandTests {
"https://github.com/swiftlang/swift-package-manager/issues/9006",
relationship: .defect
),
.IssueWindowsCannotSaveAttachment,
arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms),
)
func migrateCommandWhenDependencyBuildsForHostAndTarget(
data: BuildData,
) async throws {
try await withKnownIssue(isIntermittent: true) {
try await fixture(name: "SwiftMigrate/ExistentialAnyWithCommonPluginDependencyMigration") {
fixturePath in
let (stdout, _) = try await execute(
Expand All @@ -4268,6 +4278,9 @@ struct PackageCommandTests {
)
#expect(stdout.contains(regexMatch))
}
} when: {
ProcessInfo.hostOperatingSystem == .windows
}
}

@Test(
Expand Down Expand Up @@ -4528,7 +4541,7 @@ struct PackageCommandTests {
@Test(
.tags(
.Feature.Command.Build,
.Feature.PackageType.BuildToolPlugin
.Feature.PackageType.BuildToolPlugin
),
.requiresSwiftConcurrencySupport,
arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms),
Expand Down Expand Up @@ -5270,7 +5283,7 @@ struct PackageCommandTests {
@Test(
.tags(
.Feature.Command.Build,
.Feature.PackageType.CommandPlugin
.Feature.PackageType.CommandPlugin
),
.requiresSwiftConcurrencySupport,
.issue(
Expand Down
2 changes: 1 addition & 1 deletion Tests/FunctionalTests/PluginTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,7 @@ struct PluginTests {
func testTransitivePluginOnlyDependency(
buildSystem: BuildSystemProvider.Kind,
) async throws {
try await withKnownIssue {
try await withKnownIssue(isIntermittent: true) {
try await fixture(name: "Miscellaneous/Plugins") { fixturePath in
let (stdout, _) = try await executeSwiftBuild(
fixturePath.appending("TransitivePluginOnlyDependency"),
Expand Down
6 changes: 3 additions & 3 deletions Tests/IntegrationTests/SwiftPMTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private struct SwiftPMTests {
runOutput.stdout == """
SwiftFramework()
Library(framework: SwiftFramework.SwiftFramework())

"""
)
}
Expand Down Expand Up @@ -311,7 +311,7 @@ private struct SwiftPMTests {
let coveragePath = try AbsolutePath(validating: expectedCoveragePath)

// Check the coverage path exists.
try withKnownIssue {
try withKnownIssue(isIntermittent: ProcessInfo.hostOperatingSystem == .windows) {
// the CoveragePath file does not exists in Linux platform build
expectFileExists(at: coveragePath)

Expand Down Expand Up @@ -364,7 +364,7 @@ private struct SwiftPMTests {
#expect(binarySpecificProfrawFiles.count == 3)
}
} when: {
ProcessInfo.hostOperatingSystem == .linux && buildSystem == .swiftbuild
[.linux, .windows].contains(ProcessInfo.hostOperatingSystem) && buildSystem == .swiftbuild
}
}
}
Expand Down
34 changes: 15 additions & 19 deletions Tests/PackageLoadingTests/PD_6_2_LoadingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,21 @@ struct PackageDescription6_2LoadingTests {
"""

let observability = ObservabilitySystem.makeForTesting()
try await withKnownIssue("https://github.com/swiftlang/swift-package-manager/issues/8543: there are compilation errors on Windows") {
let (_, validationDiagnostics) = try await PackageDescriptionLoadingTests
.loadAndValidateManifest(
content,
toolsVersion: .v6_2,
packageKind: .fileSystem(.root),
manifestLoader: ManifestLoader(
toolchain: try! UserToolchain.default
),
observabilityScope: observability.topScope
)
try expectDiagnostics(validationDiagnostics) { results in
results.checkIsEmpty()
}
try expectDiagnostics(observability.diagnostics) { results in
results.checkIsEmpty()
}
} when: {
isWindows && !CiEnvironment.runningInSmokeTestPipeline
let (_, validationDiagnostics) = try await PackageDescriptionLoadingTests
.loadAndValidateManifest(
content,
toolsVersion: .v6_2,
packageKind: .fileSystem(.root),
manifestLoader: ManifestLoader(
toolchain: try! UserToolchain.default
),
observabilityScope: observability.topScope
)
try expectDiagnostics(validationDiagnostics) { results in
results.checkIsEmpty()
}
try expectDiagnostics(observability.diagnostics) { results in
results.checkIsEmpty()
}
}
}
Expand Down