@@ -846,6 +846,23 @@ struct BuildCommandTestCases {
846846 }
847847 }
848848
849+ @Test
850+ func pifManifestFileIsCreatedInTheRootScratchPathDirectory( ) async throws {
851+ try await fixture ( name: " Miscellaneous/ParseableInterfaces " ) { fixturePath in
852+ try await withTemporaryDirectory { tmpDir in
853+ try await executeSwiftBuild (
854+ fixturePath,
855+ extraArgs: [
856+ " --scratch-path " ,
857+ tmpDir. pathString,
858+ ] ,
859+ buildSystem: . swiftbuild
860+ )
861+ expectFileExists ( at: tmpDir. appending ( " manifest.pif " ) )
862+ }
863+ }
864+ }
865+
849866 @Test (
850867 . tags(
851868 . Feature. BuildCache,
@@ -857,47 +874,43 @@ struct BuildCommandTestCases {
857874 data: BuildData ,
858875 ) async throws {
859876 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- }
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+ }
875891
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- }
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+ }
884900
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- }
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) )
898913 }
899- } when: {
900- buildSystem == . swiftbuild && ( ProcessInfo . hostOperatingSystem == . windows)
901914 }
902915 }
903916
@@ -1135,31 +1148,24 @@ struct BuildCommandTestCases {
11351148 func swiftDriverRawOutputGetsNewlines(
11361149 buildSystem: BuildSystemProvider . Kind ,
11371150 ) 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- }
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 " ) )
11601168 }
1161- } when: {
1162- ProcessInfo . hostOperatingSystem == . windows && buildSystem == . swiftbuild
11631169 }
11641170 }
11651171
0 commit comments