No problem!
Here's the detail:
find /Applications/Xcode.app | grep xctest
resulted in:
/Applications/Xcode.app/Contents/Developer/usr/bin/xctest
export TOOLCHAIN=/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2021-10-28-a.xctoolchain
export XCTEST=/Applications/Xcode.app/Contents/Developer/usr/bin/xctest
➜ swift-distributed-actors git:(main) echo $XCTEST
/Applications/Xcode.app/Contents/Developer/usr/bin/xctest
➜ swift-distributed-actors git:(main) echo $TOOLCHAIN
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2021-10-28-a.xctoolchain
Then I ran:
$TOOLCHAIN/usr/bin/swift build --build-tests && $XCTEST .build/x86_64-apple-macosx/debug/swift-distributed-actorsPackageTests.xctest
The result of which was a failure linking to the dispatch library:
[0/0] Build complete!
2021-11-01 21:42:01.713 xctest[4792:35302] The bundle “swift-distributed-actorsPackageTests.xctest” couldn’t be loaded. Try reinstalling the bundle.
2021-11-01 21:42:01.713 xctest[4792:35302] (dlopen(/Users/heckj/src/swift-distributed-actors/.build/x86_64-apple-macosx/debug/swift-distributed-actorsPackageTests.xctest/Contents/MacOS/swift-distributed-actorsPackageTests, 0x0109): Library not loaded: /usr/lib/swift/libswift_Distributed.dylib
Referenced from: /Users/heckj/src/swift-distributed-actors/.build/x86_64-apple-macosx/debug/swift-distributed-actorsPackageTests.xctest/Contents/MacOS/swift-distributed-actorsPackageTests
Reason: tried: '/usr/lib/swift/libswift_Distributed.dylib' (no such file), '/usr/local/lib/libswift_Distributed.dylib' (no such file), '/usr/lib/libswift_Distributed.dylib' (no such file))
I tried the specific version as well:
$TOOLCHAIN/usr/bin/swift build --build-tests && $XCTEST -XCTest "DistributedActorsTests.DistributedReceptionistTests" .build/x86_64-apple-macosx/debug/swift-distributed-actorsPackageTests.xctest
but with the same results:
[0/0] Build complete!
2021-11-01 21:45:51.518 xctest[5002:38562] The bundle “swift-distributed-actorsPackageTests.xctest” couldn’t be loaded. Try reinstalling the bundle.
2021-11-01 21:45:51.518 xctest[5002:38562] (dlopen(/Users/heckj/src/swift-distributed-actors/.build/x86_64-apple-macosx/debug/swift-distributed-actorsPackageTests.xctest/Contents/MacOS/swift-distributed-actorsPackageTests, 0x0109): Library not loaded: /usr/lib/swift/libswift_Distributed.dylib
Referenced from: /Users/heckj/src/swift-distributed-actors/.build/x86_64-apple-macosx/debug/swift-distributed-actorsPackageTests.xctest/Contents/MacOS/swift-distributed-actorsPackageTests
Reason: tried: '/usr/lib/swift/libswift_Distributed.dylib' (no such file), '/usr/local/lib/libswift_Distributed.dylib' (no such file), '/usr/lib/libswift_Distributed.dylib' (no such file))
My supposition is that the xctest that's included with Xcode can't or won't allow me to influence the DYLD path - possibly just while SIP is still enabled. I haven't disabled it, per your earlier suggestion - with the intel laptop that I'm working on, I'm "not supposed to", so I'll have to pass on that part of the validation effort for now.
I'll be super curious to see what @slashmo might report, if he has SIP disabled locally.
(and I'm happy to run/try further experiments with my "stock" macOS/Xcode + nightly toolchain combination)