@@ -426,8 +426,9 @@ fileprivate struct BuildOperationTests: CoreBasedTests {
426426 " UnitTestRunner " ,
427427 type: . swiftpmTestRunner,
428428 buildConfigurations: [
429- TestBuildConfiguration ( " Debug " ,
430- buildSettings: [ : ] ) ,
429+ TestBuildConfiguration ( " Debug " , buildSettings: [
430+ " LD_RUNPATH_SEARCH_PATHS " : " $(RPATH_ORIGIN) " ,
431+ ] ) ,
431432 ] ,
432433 buildPhases: [
433434 TestSourcesBuildPhase ( ) ,
@@ -442,8 +443,8 @@ fileprivate struct BuildOperationTests: CoreBasedTests {
442443 type: . unitTest,
443444 buildConfigurations: [
444445 TestBuildConfiguration ( " Debug " , buildSettings: [
445- " DYLIB_INSTALL_NAME_BASE " : " $ORIGIN " ,
446- " LD_RUNPATH_SEARCH_PATHS " : " @loader_path/ " ,
446+ " LD_RUNPATH_SEARCH_PATHS " : " $(RPATH_ORIGIN) " ,
447+ " LD_DYLIB_INSTALL_NAME " : " MyTests.so "
447448 ] )
448449 ] ,
449450 buildPhases: [
@@ -461,8 +462,8 @@ fileprivate struct BuildOperationTests: CoreBasedTests {
461462 type: . dynamicLibrary,
462463 buildConfigurations: [
463464 TestBuildConfiguration ( " Debug " , buildSettings: [
464- " DYLIB_INSTALL_NAME_BASE " : " $ORIGIN " ,
465- " LD_RUNPATH_SEARCH_PATHS " : " @loader_path/ " ,
465+ " LD_RUNPATH_SEARCH_PATHS " : " $(RPATH_ORIGIN) " ,
466+ " LD_DYLIB_INSTALL_NAME " : " liblibrary.so " ,
466467
467468 // FIXME: Find a way to make these default
468469 " EXECUTABLE_PREFIX " : " lib " ,
@@ -516,11 +517,11 @@ fileprivate struct BuildOperationTests: CoreBasedTests {
516517
517518 do {
518519 let executionResult = try await Process . getOutput ( url: URL ( fileURLWithPath: projectDir. join ( " build " ) . join ( " Debug \( destination. builtProductsDirSuffix) " ) . join ( core. hostOperatingSystem. imageFormat. executableName ( basename: " UnitTestRunner " ) ) . str) , arguments: [ ] , environment: environment)
519- #expect( String ( decoding: executionResult. stdout, as: UTF8 . self) . contains ( " Executed 1 test, with 0 failures " ) )
520+ #expect( String ( decoding: executionResult. stdout, as: UTF8 . self) . contains ( " Executed 1 test " ) )
520521 }
521522 do {
522523 let executionResult = try await Process . getOutput ( url: URL ( fileURLWithPath: projectDir. join ( " build " ) . join ( " Debug \( destination. builtProductsDirSuffix) " ) . join ( core. hostOperatingSystem. imageFormat. executableName ( basename: " UnitTestRunner " ) ) . str) , arguments: [ " --testing-library " , " swift-testing " ] , environment: environment)
523- #expect( String ( decoding: executionResult. stderr, as: UTF8 . self) . contains ( " Test run with 1 test in 1 suite passed " ) )
524+ #expect( String ( decoding: executionResult. stderr, as: UTF8 . self) . contains ( " Test run with 1 test " ) )
524525 }
525526 }
526527 }
0 commit comments