@@ -818,31 +818,27 @@ struct BuildCommandTestCases {
818818 data: BuildData ,
819819 ) async throws {
820820 let buildSystem = data. buildSystem
821- try await withKnownIssue {
822- try await fixture ( name: " Miscellaneous/LibraryEvolution " ) { fixturePath in
823- let result = try await build (
824- [ ] ,
825- packagePath: fixturePath,
826- configuration: data. config,
827- buildSystem: buildSystem,
828- )
829- switch buildSystem {
830- case . native:
831- #expect( result. moduleContents. contains ( " A.swiftinterface " ) )
832- #expect( result. moduleContents. contains ( " B.swiftinterface " ) )
833- case . swiftbuild, . xcode:
834- let moduleARegex = try Regex ( #"A[.]swiftmodule[/].*[.]swiftinterface"# )
835- let moduleBRegex = try Regex ( #"B[.]swiftmodule[/].*[.]swiftmodule"# )
836- withKnownIssue ( " SWBINTTODO: Test failed because of missing 'A.swiftmodule/*.swiftinterface' files " ) {
837- #expect( result. moduleContents. contains { $0. contains ( moduleARegex) } )
838- } when: {
839- buildSystem == . swiftbuild
840- }
841- #expect( result. moduleContents. contains { $0. contains ( moduleBRegex) } )
842- }
821+ try await fixture ( name: " Miscellaneous/LibraryEvolution " ) { fixturePath in
822+ let result = try await build (
823+ [ ] ,
824+ packagePath: fixturePath,
825+ configuration: data. config,
826+ buildSystem: buildSystem,
827+ )
828+ switch buildSystem {
829+ case . native:
830+ #expect( result. moduleContents. contains ( " A.swiftinterface " ) )
831+ #expect( result. moduleContents. contains ( " B.swiftinterface " ) )
832+ case . swiftbuild, . xcode:
833+ let moduleARegex = try Regex ( #"A[.]swiftmodule[/].*[.]swiftinterface"# )
834+ let moduleBRegex = try Regex ( #"B[.]swiftmodule[/].*[.]swiftmodule"# )
835+ withKnownIssue ( " SWBINTTODO: Test failed because of missing 'A.swiftmodule/*.swiftinterface' files " ) {
836+ #expect( result. moduleContents. contains { $0. contains ( moduleARegex) } )
837+ } when: {
838+ buildSystem == . swiftbuild
839+ }
840+ #expect( result. moduleContents. contains { $0. contains ( moduleBRegex) } )
843841 }
844- } when: {
845- buildSystem == . swiftbuild && ProcessInfo . hostOperatingSystem == . windows
846842 }
847843 }
848844
@@ -857,47 +853,43 @@ struct BuildCommandTestCases {
857853 data: BuildData ,
858854 ) async throws {
859855 let buildSystem = data. buildSystem
860- try await withKnownIssue {
861- try await fixture ( name: " DependencyResolution/Internal/Simple " ) { fixturePath in
862- let buildCompleteRegex = try Regex ( #"Build complete!\s?(\([0-9]*\.[0-9]*\s*s(econds)?\))?"# )
863- do {
864- let result = try await execute (
865- packagePath: fixturePath,
866- configuration: data. config,
867- buildSystem: buildSystem,
868- )
869- // This test fails to match the 'Compiling' regex; rdar://101815761
870- // XCTAssertMatch(result.stdout, .regex("\\[[1-9][0-9]*\\/[1-9][0-9]*\\] Compiling"))
871- let lines = result. stdout. split ( whereSeparator: { $0. isNewline } )
872- let lastLine = try #require( lines. last)
873- #expect( lastLine. contains ( buildCompleteRegex) )
874- }
856+ try await fixture ( name: " DependencyResolution/Internal/Simple " ) { fixturePath in
857+ let buildCompleteRegex = try Regex ( #"Build complete!\s?(\([0-9]*\.[0-9]*\s*s(econds)?\))?"# )
858+ do {
859+ let result = try await execute (
860+ packagePath: fixturePath,
861+ configuration: data. config,
862+ buildSystem: buildSystem,
863+ )
864+ // This test fails to match the 'Compiling' regex; rdar://101815761
865+ // XCTAssertMatch(result.stdout, .regex("\\[[1-9][0-9]*\\/[1-9][0-9]*\\] Compiling"))
866+ let lines = result. stdout. split ( whereSeparator: { $0. isNewline } )
867+ let lastLine = try #require( lines. last)
868+ #expect( lastLine. contains ( buildCompleteRegex) )
869+ }
875870
876- do {
877- // test second time, to stabilize the cache
878- try await execute (
879- packagePath: fixturePath,
880- configuration: data. config,
881- buildSystem: buildSystem,
882- )
883- }
871+ do {
872+ // test second time, to stabilize the cache
873+ try await execute (
874+ packagePath: fixturePath,
875+ configuration: data. config,
876+ buildSystem: buildSystem,
877+ )
878+ }
884879
885- do {
886- // test third time, to make sure message is presented even when nothing to build (cached)
887- let result = try await execute (
888- packagePath: fixturePath,
889- configuration: data. config,
890- buildSystem: buildSystem,
891- )
892- // This test fails to match the 'Compiling' regex; rdar://101815761
893- // XCTAssertNoMatch(result.stdout, .regex("\\[[1-9][0-9]*\\/[1-9][0-9]*\\] Compiling"))
894- let lines = result. stdout. split ( whereSeparator: { $0. isNewline } )
895- let lastLine = try #require( lines. last)
896- #expect( lastLine. contains ( buildCompleteRegex) )
897- }
880+ do {
881+ // test third time, to make sure message is presented even when nothing to build (cached)
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+ // XCTAssertNoMatch(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) )
898892 }
899- } when: {
900- buildSystem == . swiftbuild && ( ProcessInfo . hostOperatingSystem == . windows)
901893 }
902894 }
903895
@@ -1135,31 +1127,24 @@ struct BuildCommandTestCases {
11351127 func swiftDriverRawOutputGetsNewlines(
11361128 buildSystem: BuildSystemProvider . Kind ,
11371129 ) async throws {
1138- try await withKnownIssue (
1139- " error produced for this fixture " ,
1140- isIntermittent: ProcessInfo . hostOperatingSystem == . linux,
1141- ) {
1142- try await fixture ( name: " DependencyResolution/Internal/Simple " ) { fixturePath in
1143- // Building with `-wmo` should result in a `remark: Incremental compilation has been disabled: it is not
1144- // compatible with whole module optimization` message, which should have a trailing newline. Since that
1145- // message won't be there at all when the legacy compiler driver is used, we gate this check on whether the
1146- // remark is there in the first place.
1147- let result = try await execute (
1148- [ " -Xswiftc " , " -wmo " ] ,
1149- packagePath: fixturePath,
1150- configuration: . release,
1151- buildSystem: buildSystem,
1152- )
1153- if result. stdout. contains (
1154- " remark: Incremental compilation has been disabled: it is not compatible with whole module optimization "
1155- ) {
1156- #expect( result. stdout. contains ( " optimization \n " ) )
1157- #expect( !result. stdout. contains ( " optimization[ " ) )
1158- #expect( !result. stdout. contains ( " optimizationremark " ) )
1159- }
1130+ try await fixture ( name: " DependencyResolution/Internal/Simple " ) { fixturePath in
1131+ // Building with `-wmo` should result in a `remark: Incremental compilation has been disabled: it is not
1132+ // compatible with whole module optimization` message, which should have a trailing newline. Since that
1133+ // message won't be there at all when the legacy compiler driver is used, we gate this check on whether the
1134+ // remark is there in the first place.
1135+ let result = try await execute (
1136+ [ " -Xswiftc " , " -wmo " ] ,
1137+ packagePath: fixturePath,
1138+ configuration: . release,
1139+ buildSystem: buildSystem,
1140+ )
1141+ if result. stdout. contains (
1142+ " remark: Incremental compilation has been disabled: it is not compatible with whole module optimization "
1143+ ) {
1144+ #expect( result. stdout. contains ( " optimization \n " ) )
1145+ #expect( !result. stdout. contains ( " optimization[ " ) )
1146+ #expect( !result. stdout. contains ( " optimizationremark " ) )
11601147 }
1161- } when: {
1162- ProcessInfo . hostOperatingSystem == . windows && buildSystem == . swiftbuild
11631148 }
11641149 }
11651150
@@ -1469,7 +1454,7 @@ struct BuildCommandTestCases {
14691454 """
14701455 Windows: Sometimes failed to build due to a possible path issue
14711456 All: --very-verbose causes rebuild on SwiftBuild (https://github.com/swiftlang/swift-package-manager/issues/9299)
1472- """ ,
1457+ """ ,
14731458 isIntermittent: true ) {
14741459 try await fixture ( name: " ValidLayouts/SingleModule/ExecutableNew " ) { fixturePath in
14751460 _ = try await build (
0 commit comments