@@ -426,8 +426,9 @@ fileprivate struct BuildOperationTests: CoreBasedTests {
426
426
" UnitTestRunner " ,
427
427
type: . swiftpmTestRunner,
428
428
buildConfigurations: [
429
- TestBuildConfiguration ( " Debug " ,
430
- buildSettings: [ : ] ) ,
429
+ TestBuildConfiguration ( " Debug " , buildSettings: [
430
+ " LD_RUNPATH_SEARCH_PATHS " : " $(RPATH_ORIGIN) " ,
431
+ ] ) ,
431
432
] ,
432
433
buildPhases: [
433
434
TestSourcesBuildPhase ( ) ,
@@ -442,8 +443,8 @@ fileprivate struct BuildOperationTests: CoreBasedTests {
442
443
type: . unitTest,
443
444
buildConfigurations: [
444
445
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 "
447
448
] )
448
449
] ,
449
450
buildPhases: [
@@ -461,8 +462,8 @@ fileprivate struct BuildOperationTests: CoreBasedTests {
461
462
type: . dynamicLibrary,
462
463
buildConfigurations: [
463
464
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 " ,
466
467
467
468
// FIXME: Find a way to make these default
468
469
" EXECUTABLE_PREFIX " : " lib " ,
@@ -516,11 +517,11 @@ fileprivate struct BuildOperationTests: CoreBasedTests {
516
517
517
518
do {
518
519
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 " ) )
520
521
}
521
522
do {
522
523
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 " ) )
524
525
}
525
526
}
526
527
}
0 commit comments