@@ -782,7 +782,7 @@ struct BuildCommandTestCases {
782782 ) async throws {
783783 let buildSystem = data. buildSystem
784784 try await fixture ( name: " Miscellaneous/ParseableInterfaces " ) { fixturePath in
785- try await withKnownIssue ( isIntermittent: ProcessInfo . hostOperatingSystem == . windows ) {
785+ try await withKnownIssue ( isIntermittent: true ) {
786786 let result = try await build (
787787 [ " --enable-parseable-module-interfaces " ] ,
788788 packagePath: fixturePath,
@@ -864,6 +864,7 @@ struct BuildCommandTestCases {
864864 }
865865
866866 @Test (
867+ . IssueWindowsLongPath,
867868 . tags(
868869 . Feature. BuildCache,
869870 ) ,
@@ -874,43 +875,47 @@ struct BuildCommandTestCases {
874875 data: BuildData ,
875876 ) async throws {
876877 let buildSystem = data. buildSystem
877- try await fixture ( name: " DependencyResolution/Internal/Simple " ) { fixturePath in
878- let buildCompleteRegex = try Regex ( #"Build complete!\s?(\([0-9]*\.[0-9]*\s*s(econds)?\))?"# )
879- do {
880- let result = try await execute (
881- packagePath: fixturePath,
882- configuration: data. config,
883- buildSystem: buildSystem,
884- )
885- // This test fails to match the 'Compiling' regex; rdar://101815761
886- // XCTAssertMatch(result.stdout, .regex("\\[[1-9][0-9]*\\/[1-9][0-9]*\\] Compiling"))
887- let lines = result. stdout. split ( whereSeparator: { $0. isNewline } )
888- let lastLine = try #require( lines. last)
889- #expect( lastLine. contains ( buildCompleteRegex) )
890- }
878+ try await withKnownIssue ( isIntermittent: true ) {
879+ try await fixture ( name: " DependencyResolution/Internal/Simple " ) { fixturePath in
880+ let buildCompleteRegex = try Regex ( #"Build complete!\s?(\([0-9]*\.[0-9]*\s*s(econds)?\))?"# )
881+ do {
882+ let result = try await execute (
883+ packagePath: fixturePath,
884+ configuration: data. config,
885+ buildSystem: buildSystem,
886+ )
887+ // This test fails to match the 'Compiling' regex; rdar://101815761
888+ // XCTAssertMatch(result.stdout, .regex("\\[[1-9][0-9]*\\/[1-9][0-9]*\\] Compiling"))
889+ let lines = result. stdout. split ( whereSeparator: { $0. isNewline } )
890+ let lastLine = try #require( lines. last)
891+ #expect( lastLine. contains ( buildCompleteRegex) )
892+ }
891893
892- do {
893- // test second time, to stabilize the cache
894- try await execute (
895- packagePath: fixturePath,
896- configuration: data. config,
897- buildSystem: buildSystem,
898- )
899- }
894+ do {
895+ // test second time, to stabilize the cache
896+ try await execute (
897+ packagePath: fixturePath,
898+ configuration: data. config,
899+ buildSystem: buildSystem,
900+ )
901+ }
900902
901- do {
902- // test third time, to make sure message is presented even when nothing to build (cached)
903- let result = try await execute (
904- packagePath: fixturePath,
905- configuration: data. config,
906- buildSystem: buildSystem,
907- )
908- // This test fails to match the 'Compiling' regex; rdar://101815761
909- // XCTAssertNoMatch(result.stdout, .regex("\\[[1-9][0-9]*\\/[1-9][0-9]*\\] Compiling"))
910- let lines = result. stdout. split ( whereSeparator: { $0. isNewline } )
911- let lastLine = try #require( lines. last)
912- #expect( lastLine. contains ( buildCompleteRegex) )
903+ do {
904+ // test third time, to make sure message is presented even when nothing to build (cached)
905+ let result = try await execute (
906+ packagePath: fixturePath,
907+ configuration: data. config,
908+ buildSystem: buildSystem,
909+ )
910+ // This test fails to match the 'Compiling' regex; rdar://101815761
911+ // XCTAssertNoMatch(result.stdout, .regex("\\[[1-9][0-9]*\\/[1-9][0-9]*\\] Compiling"))
912+ let lines = result. stdout. split ( whereSeparator: { $0. isNewline } )
913+ let lastLine = try #require( lines. last)
914+ #expect( lastLine. contains ( buildCompleteRegex) )
915+ }
913916 }
917+ } when: {
918+ ( buildSystem == . swiftbuild && ProcessInfo . hostOperatingSystem == . windows)
914919 }
915920 }
916921
@@ -1148,24 +1153,31 @@ struct BuildCommandTestCases {
11481153 func swiftDriverRawOutputGetsNewlines(
11491154 buildSystem: BuildSystemProvider . Kind ,
11501155 ) async throws {
1151- try await fixture ( name: " DependencyResolution/Internal/Simple " ) { fixturePath in
1152- // Building with `-wmo` should result in a `remark: Incremental compilation has been disabled: it is not
1153- // compatible with whole module optimization` message, which should have a trailing newline. Since that
1154- // message won't be there at all when the legacy compiler driver is used, we gate this check on whether the
1155- // remark is there in the first place.
1156- let result = try await execute (
1157- [ " -Xswiftc " , " -wmo " ] ,
1158- packagePath: fixturePath,
1159- configuration: . release,
1160- buildSystem: buildSystem,
1161- )
1162- if result. stdout. contains (
1163- " remark: Incremental compilation has been disabled: it is not compatible with whole module optimization "
1164- ) {
1165- #expect( result. stdout. contains ( " optimization \n " ) )
1166- #expect( !result. stdout. contains ( " optimization[ " ) )
1167- #expect( !result. stdout. contains ( " optimizationremark " ) )
1156+ try await withKnownIssue (
1157+ " error produced for this fixture " ,
1158+ isIntermittent: true ,
1159+ ) {
1160+ try await fixture ( name: " DependencyResolution/Internal/Simple " ) { fixturePath in
1161+ // Building with `-wmo` should result in a `remark: Incremental compilation has been disabled: it is not
1162+ // compatible with whole module optimization` message, which should have a trailing newline. Since that
1163+ // message won't be there at all when the legacy compiler driver is used, we gate this check on whether the
1164+ // remark is there in the first place.
1165+ let result = try await execute (
1166+ [ " -Xswiftc " , " -wmo " ] ,
1167+ packagePath: fixturePath,
1168+ configuration: . release,
1169+ buildSystem: buildSystem,
1170+ )
1171+ if result. stdout. contains (
1172+ " remark: Incremental compilation has been disabled: it is not compatible with whole module optimization "
1173+ ) {
1174+ #expect( result. stdout. contains ( " optimization \n " ) )
1175+ #expect( !result. stdout. contains ( " optimization[ " ) )
1176+ #expect( !result. stdout. contains ( " optimizationremark " ) )
1177+ }
11681178 }
1179+ } when: {
1180+ ProcessInfo . hostOperatingSystem == . windows && buildSystem == . swiftbuild
11691181 }
11701182 }
11711183
@@ -1205,7 +1217,7 @@ struct BuildCommandTestCases {
12051217
12061218 try await withKnownIssue (
12071219 " https://github.com/swiftlang/swift-package-manager/issues/8659, SWIFT_EXEC override is not working " ,
1208- isIntermittent: ( buildSystem == . native && config == . release )
1220+ isIntermittent: true
12091221 ) {
12101222 // Build with a swiftc that returns version 1.0, we expect a successful build which compiles our one source
12111223 // file.
@@ -1300,7 +1312,7 @@ struct BuildCommandTestCases {
13001312 func getTaskAllowEntitlement(
13011313 buildSystem: BuildSystemProvider . Kind ,
13021314 ) async throws {
1303- try await withKnownIssue ( isIntermittent: ( ProcessInfo . hostOperatingSystem == . linux ) ) {
1315+ try await withKnownIssue ( isIntermittent: true ) {
13041316 try await fixture ( name: " ValidLayouts/SingleModule/ExecutableNew " ) { fixturePath in
13051317 #if os(macOS)
13061318 // try await building with default parameters. This should succeed. We build verbosely so we get full command
@@ -1512,7 +1524,7 @@ struct BuildCommandTestCases {
15121524 func parseAsLibraryCriteria(
15131525 buildData: BuildData ,
15141526 ) async throws {
1515- try await withKnownIssue {
1527+ try await withKnownIssue ( isIntermittent : true ) {
15161528 try await fixture ( name: " Miscellaneous/ParseAsLibrary " ) { fixturePath in
15171529 _ = try await executeSwiftBuild (
15181530 fixturePath,
0 commit comments