Skip to content

Commit c49bb55

Browse files
committed
Mark flaky tests for Windows
This is due to #9420
1 parent 6c26529 commit c49bb55

File tree

1 file changed

+34
-16
lines changed

1 file changed

+34
-16
lines changed

Tests/CommandsTests/TestCommandTests.swift

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,11 +1331,17 @@ struct TestCommandTests {
13311331
buildSystem: BuildSystemProvider.Kind,
13321332
) async throws {
13331333
try await fixture(name: "Miscellaneous/DefaultInteropMode") { fixturePath in
1334-
try await executeSwiftTest(
1335-
fixturePath,
1336-
buildSystem: buildSystem,
1337-
throwIfCommandFails: true,
1338-
)
1334+
try await withKnownIssue(isIntermittent: true) {
1335+
try await executeSwiftTest(
1336+
fixturePath,
1337+
buildSystem: buildSystem,
1338+
throwIfCommandFails: true,
1339+
)
1340+
} when: {
1341+
// Swift Build on Windows sometimes fails to generate LinkFileList files.
1342+
// https://github.com/swiftlang/swift-package-manager/issues/9420
1343+
ProcessInfo.hostOperatingSystem == .windows && buildSystem == .swiftbuild
1344+
}
13391345
}
13401346
}
13411347

@@ -1346,11 +1352,17 @@ struct TestCommandTests {
13461352
buildSystem: BuildSystemProvider.Kind,
13471353
) async throws {
13481354
try await fixture(name: "Miscellaneous/NoDefaultInteropMode") { fixturePath in
1349-
try await executeSwiftTest(
1350-
fixturePath,
1351-
buildSystem: buildSystem,
1352-
throwIfCommandFails: true,
1353-
)
1355+
try await withKnownIssue(isIntermittent: true) {
1356+
try await executeSwiftTest(
1357+
fixturePath,
1358+
buildSystem: buildSystem,
1359+
throwIfCommandFails: true,
1360+
)
1361+
} when: {
1362+
// Swift Build on Windows sometimes fails to generate LinkFileList files.
1363+
// https://github.com/swiftlang/swift-package-manager/issues/9420
1364+
ProcessInfo.hostOperatingSystem == .windows && buildSystem == .swiftbuild
1365+
}
13541366
}
13551367
}
13561368

@@ -1361,12 +1373,18 @@ struct TestCommandTests {
13611373
buildSystem: BuildSystemProvider.Kind,
13621374
) async throws {
13631375
try await fixture(name: "Miscellaneous/RespectUserInteropMode") { fixturePath in
1364-
try await executeSwiftTest(
1365-
fixturePath,
1366-
env: ["SWIFT_TESTING_XCTEST_INTEROP_MODE": "none"],
1367-
buildSystem: buildSystem,
1368-
throwIfCommandFails: true,
1369-
)
1376+
try await withKnownIssue(isIntermittent: true) {
1377+
try await executeSwiftTest(
1378+
fixturePath,
1379+
env: ["SWIFT_TESTING_XCTEST_INTEROP_MODE": "none"],
1380+
buildSystem: buildSystem,
1381+
throwIfCommandFails: true,
1382+
)
1383+
} when: {
1384+
// Swift Build on Windows sometimes fails to generate LinkFileList files.
1385+
// https://github.com/swiftlang/swift-package-manager/issues/9420
1386+
ProcessInfo.hostOperatingSystem == .windows && buildSystem == .swiftbuild
1387+
}
13701388
}
13711389
}
13721390

0 commit comments

Comments
 (0)