@@ -238,8 +238,6 @@ $ArchX64 = @{
238238 LLVMTarget = " x86_64-unknown-windows-msvc" ;
239239 CMakeName = " AMD64" ;
240240 BinaryDir = " bin64" ;
241- XCTestInstallRoot = " $BinaryCache \x64\Windows.platform\Developer\Library\XCTest-development" ;
242- SwiftTestingInstallRoot = " $BinaryCache \x64\Windows.platform\Developer\Library\Testing-development" ;
243241 ToolchainInstallRoot = " $BinaryCache \x64\toolchains\$ProductVersion +$Variant " ;
244242 Cache = @ {};
245243}
@@ -251,8 +249,6 @@ $ArchX86 = @{
251249 LLVMTarget = " i686-unknown-windows-msvc" ;
252250 CMakeName = " i686" ;
253251 BinaryDir = " bin32" ;
254- XCTestInstallRoot = " $BinaryCache \x86\Windows.platform\Developer\Library\XCTest-development" ;
255- SwiftTestingInstallRoot = " $BinaryCache \x86\Windows.platform\Developer\Library\Testing-development" ;
256252 Cache = @ {};
257253}
258254
@@ -263,9 +259,7 @@ $ArchARM64 = @{
263259 LLVMTarget = " aarch64-unknown-windows-msvc" ;
264260 CMakeName = " ARM64" ;
265261 BinaryDir = " bin64a" ;
266- XCTestInstallRoot = " $BinaryCache \arm64\Windows.platform\Developer\Library\XCTest-development" ;
267262 ToolchainInstallRoot = " $BinaryCache \arm64\toolchains\$ProductVersion +$Variant " ;
268- SwiftTestingInstallRoot = " $BinaryCache \arm64\Windows.platform\Developer\Library\Testing-development" ;
269263 Cache = @ {};
270264}
271265
@@ -276,8 +270,6 @@ $AndroidARM64 = @{
276270 LLVMName = " aarch64" ;
277271 LLVMTarget = " aarch64-unknown-linux-android$AndroidAPILevel " ;
278272 ShortName = " arm64" ;
279- XCTestInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\Library\XCTest-development" ;
280- SwiftTestingInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\Library\Testing-development" ;
281273 Cache = @ {};
282274}
283275
@@ -288,8 +280,6 @@ $AndroidARMv7 = @{
288280 LLVMName = " armv7" ;
289281 LLVMTarget = " armv7-unknown-linux-androideabi$AndroidAPILevel " ;
290282 ShortName = " armv7" ;
291- XCTestInstallRoot = " $BinaryCache \armv7\Android.platform\Developer\Library\XCTest-development" ;
292- SwiftTestingInstallRoot = " $BinaryCache \armv7\Android.platform\Developer\Library\Testing-development" ;
293283 Cache = @ {};
294284}
295285
@@ -300,8 +290,6 @@ $AndroidX86 = @{
300290 LLVMName = " i686" ;
301291 LLVMTarget = " i686-unknown-linux-android$AndroidAPILevel " ;
302292 ShortName = " x86" ;
303- XCTestInstallRoot = " $BinaryCache \x86\Android.platform\Developer\Library\XCTest-development" ;
304- SwiftTestingInstallRoot = " $BinaryCache \x86\Android.platform\Developer\Library\Testing-development" ;
305293 Cache = @ {};
306294}
307295
@@ -312,8 +300,6 @@ $AndroidX64 = @{
312300 LLVMName = " x86_64" ;
313301 LLVMTarget = " x86_64-unknown-linux-android$AndroidAPILevel " ;
314302 ShortName = " x64" ;
315- XCTestInstallRoot = " $BinaryCache \x64\Android.platform\Developer\Library\XCTest-development" ;
316- SwiftTestingInstallRoot = " $BinaryCache \x64\Android.platform\Developer\Library\Testing-development" ;
317303 Cache = @ {};
318304}
319305
@@ -2384,15 +2370,18 @@ function Build-XCTest([Platform]$Platform, $Arch) {
23842370 Build-CMakeProject `
23852371 - Src $SourceCache \swift- corelibs- xctest `
23862372 - Bin $ (Get-TargetProjectBinaryCache $Arch XCTest) `
2387- - InstallTo " $ ( $Arch .XCTestInstallRoot ) \ usr" `
2373+ - InstallTo " $ ( [ IO.Path ]::Combine(( Get-PlatformRoot $Platform ) , " Developer " , " Library " , " XCTest-development " , " usr" ) ) " `
23882374 - Arch $Arch `
23892375 - Platform $Platform `
23902376 - UseBuiltCompilers Swift `
23912377 - Defines @ {
2378+ BUILD_SHARED_LIBS = " YES" ;
23922379 CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2380+ CMAKE_INSTALL_BINDIR = $Arch.BinaryDir ;
23932381 ENABLE_TESTING = " NO" ;
23942382 dispatch_DIR = $ (Get-TargetProjectCMakeModules $Arch Dispatch);
23952383 Foundation_DIR = $ (Get-TargetProjectCMakeModules $Arch DynamicFoundation);
2384+ XCTest_INSTALL_NESTED_SUBDIR = " YES" ;
23962385 }
23972386}
23982387
@@ -2424,18 +2413,20 @@ function Build-Testing([Platform]$Platform, $Arch) {
24242413 Build-CMakeProject `
24252414 - Src $SourceCache \swift- testing `
24262415 - Bin (Get-TargetProjectBinaryCache $Arch Testing) `
2427- - InstallTo " $ ( $Arch .SwiftTestingInstallRoot ) \ usr" `
2416+ - InstallTo " $ ( [ IO.Path ]::Combine(( Get-PlatformRoot $Platform ) , " Developer " , " Library " , " Testing-development " , " usr" ) ) " `
24282417 - Arch $Arch `
24292418 - Platform $Platform `
24302419 - UseBuiltCompilers C, CXX, Swift `
24312420 - Defines @ {
24322421 BUILD_SHARED_LIBS = " YES" ;
24332422 CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2423+ CMAKE_INSTALL_BINDIR = $Arch.BinaryDir ;
24342424 dispatch_DIR = (Get-TargetProjectCMakeModules $Arch Dispatch);
24352425 Foundation_DIR = (Get-TargetProjectCMakeModules $Arch DynamicFoundation);
24362426 # TODO: ensure that host and target platform match
24372427 SwiftSyntax_DIR = (Get-HostProjectCMakeModules Compilers);
24382428 SwiftTesting_MACRO = " $ ( Get-BuildProjectBinaryCache TestingMacros) \TestingMacros.dll" ;
2429+ SwiftTesting_INSTALL_NESTED_SUBDIR = " YES" ;
24392430 }
24402431}
24412432
@@ -2473,32 +2464,6 @@ function Install-Platform([Platform]$Platform, $Archs) {
24732464 Copy-File $_.FullName " $PlatformResources \$ ( $_.BaseName ) .swiftmodule\$ ( Get-ModuleTriple $Arch ) $ ( $_.Extension ) "
24742465 }
24752466 }
2476-
2477- # Copy XCTest
2478- $XCTestInstallRoot = [IO.Path ]::Combine((Get-PlatformRoot $Platform ), " Developer" , " Library" , " XCTest-development" )
2479- switch ($Platform ) {
2480- Windows {
2481- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\bin\XCTest.dll" " $XCTestInstallRoot \usr\$ ( $Arch.BinaryDir ) \"
2482- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\windows\XCTest.lib" " $XCTestInstallRoot \usr\lib\swift\windows\$ ( $Arch.LLVMName ) \"
2483- }
2484- default {
2485- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \libXCTest.so" " $XCTestInstallRoot \usr\lib\$ ( $Arch.BinaryDir ) \"
2486- }
2487- }
2488- Copy-Directory " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \XCTest.swiftmodule" " $XCTestInstallRoot \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \"
2489-
2490- # Copy Testing
2491- $SwiftTestingInstallRoot = [IO.Path ]::Combine((Get-PlatformRoot $Platform ), " Developer" , " Library" , " Testing-development" )
2492- switch ($Platform ) {
2493- Windows {
2494- Copy-File " $ ( $Arch.SwiftTestingInstallRoot ) \usr\bin\Testing.dll" " $SwiftTestingInstallRoot \usr\$ ( $Arch.BinaryDir ) \"
2495- Copy-File " $ ( $Arch.SwiftTestingInstallRoot ) \usr\lib\swift\windows\Testing.lib" " $SwiftTestingInstallRoot \usr\lib\swift\windows\$ ( $Arch.LLVMName ) \"
2496- }
2497- default {
2498- Copy-File " $ ( $Arch.SwiftTestingInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \libTesting.so" " $SwiftTestingInstallRoot \usr\lib\$ ( $Arch.BinaryDir ) \"
2499- }
2500- }
2501- Copy-Directory " $ ( $Arch.SwiftTestingInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \Testing.swiftmodule" " $SwiftTestingInstallRoot \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \"
25022467 }
25032468}
25042469
0 commit comments