@@ -239,8 +239,6 @@ $ArchX64 = @{
239
239
LLVMTarget = " x86_64-unknown-windows-msvc" ;
240
240
CMakeName = " AMD64" ;
241
241
BinaryDir = " bin64" ;
242
- XCTestInstallRoot = " $BinaryCache \x64\Windows.platform\Developer\Library\XCTest-development" ;
243
- SwiftTestingInstallRoot = " $BinaryCache \x64\Windows.platform\Developer\Library\Testing-development" ;
244
242
ToolchainInstallRoot = " $BinaryCache \x64\toolchains\$ProductVersion +$Variant " ;
245
243
Cache = @ {};
246
244
}
@@ -252,8 +250,6 @@ $ArchX86 = @{
252
250
LLVMTarget = " i686-unknown-windows-msvc" ;
253
251
CMakeName = " i686" ;
254
252
BinaryDir = " bin32" ;
255
- XCTestInstallRoot = " $BinaryCache \x86\Windows.platform\Developer\Library\XCTest-development" ;
256
- SwiftTestingInstallRoot = " $BinaryCache \x86\Windows.platform\Developer\Library\Testing-development" ;
257
253
Cache = @ {};
258
254
}
259
255
@@ -264,9 +260,7 @@ $ArchARM64 = @{
264
260
LLVMTarget = " aarch64-unknown-windows-msvc" ;
265
261
CMakeName = " ARM64" ;
266
262
BinaryDir = " bin64a" ;
267
- XCTestInstallRoot = " $BinaryCache \arm64\Windows.platform\Developer\Library\XCTest-development" ;
268
263
ToolchainInstallRoot = " $BinaryCache \arm64\toolchains\$ProductVersion +$Variant " ;
269
- SwiftTestingInstallRoot = " $BinaryCache \arm64\Windows.platform\Developer\Library\Testing-development" ;
270
264
Cache = @ {};
271
265
}
272
266
@@ -277,8 +271,6 @@ $AndroidARM64 = @{
277
271
LLVMName = " aarch64" ;
278
272
LLVMTarget = " aarch64-unknown-linux-android$AndroidAPILevel " ;
279
273
ShortName = " arm64" ;
280
- XCTestInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\Library\XCTest-development" ;
281
- SwiftTestingInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\Library\Testing-development" ;
282
274
Cache = @ {};
283
275
}
284
276
@@ -289,8 +281,6 @@ $AndroidARMv7 = @{
289
281
LLVMName = " armv7" ;
290
282
LLVMTarget = " armv7-unknown-linux-androideabi$AndroidAPILevel " ;
291
283
ShortName = " armv7" ;
292
- XCTestInstallRoot = " $BinaryCache \armv7\Android.platform\Developer\Library\XCTest-development" ;
293
- SwiftTestingInstallRoot = " $BinaryCache \armv7\Android.platform\Developer\Library\Testing-development" ;
294
284
Cache = @ {};
295
285
}
296
286
@@ -301,8 +291,6 @@ $AndroidX86 = @{
301
291
LLVMName = " i686" ;
302
292
LLVMTarget = " i686-unknown-linux-android$AndroidAPILevel " ;
303
293
ShortName = " x86" ;
304
- XCTestInstallRoot = " $BinaryCache \x86\Android.platform\Developer\Library\XCTest-development" ;
305
- SwiftTestingInstallRoot = " $BinaryCache \x86\Android.platform\Developer\Library\Testing-development" ;
306
294
Cache = @ {};
307
295
}
308
296
@@ -313,8 +301,6 @@ $AndroidX64 = @{
313
301
LLVMName = " x86_64" ;
314
302
LLVMTarget = " x86_64-unknown-linux-android$AndroidAPILevel " ;
315
303
ShortName = " x64" ;
316
- XCTestInstallRoot = " $BinaryCache \x64\Android.platform\Developer\Library\XCTest-development" ;
317
- SwiftTestingInstallRoot = " $BinaryCache \x64\Android.platform\Developer\Library\Testing-development" ;
318
304
Cache = @ {};
319
305
}
320
306
@@ -2381,15 +2367,18 @@ function Build-XCTest([Platform]$Platform, $Arch) {
2381
2367
Build-CMakeProject `
2382
2368
- Src $SourceCache \swift- corelibs- xctest `
2383
2369
- Bin $ (Get-TargetProjectBinaryCache $Arch XCTest) `
2384
- - InstallTo " $ ( $Arch .XCTestInstallRoot ) \ usr" `
2370
+ - InstallTo " $ ( [ IO.Path ]::Combine(( Get-PlatformRoot $Platform ) , " Developer " , " Library " , " XCTest-development " , " usr" ) ) " `
2385
2371
- Arch $Arch `
2386
2372
- Platform $Platform `
2387
2373
- UseBuiltCompilers Swift `
2388
2374
- Defines @ {
2375
+ BUILD_SHARED_LIBS = " YES" ;
2389
2376
CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2377
+ CMAKE_INSTALL_BINDIR = $Arch.BinaryDir ;
2390
2378
ENABLE_TESTING = " NO" ;
2391
2379
dispatch_DIR = $ (Get-TargetProjectCMakeModules $Arch Dispatch);
2392
2380
Foundation_DIR = $ (Get-TargetProjectCMakeModules $Arch DynamicFoundation);
2381
+ XCTest_INSTALL_NESTED_SUBDIR = " YES" ;
2393
2382
}
2394
2383
}
2395
2384
@@ -2421,18 +2410,20 @@ function Build-Testing([Platform]$Platform, $Arch) {
2421
2410
Build-CMakeProject `
2422
2411
- Src $SourceCache \swift- testing `
2423
2412
- Bin (Get-TargetProjectBinaryCache $Arch Testing) `
2424
- - InstallTo " $ ( $Arch .SwiftTestingInstallRoot ) \ usr" `
2413
+ - InstallTo " $ ( [ IO.Path ]::Combine(( Get-PlatformRoot $Platform ) , " Developer " , " Library " , " Testing-development " , " usr" ) ) " `
2425
2414
- Arch $Arch `
2426
2415
- Platform $Platform `
2427
2416
- UseBuiltCompilers C, CXX, Swift `
2428
2417
- Defines @ {
2429
2418
BUILD_SHARED_LIBS = " YES" ;
2430
2419
CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2420
+ CMAKE_INSTALL_BINDIR = $Arch.BinaryDir ;
2431
2421
dispatch_DIR = (Get-TargetProjectCMakeModules $Arch Dispatch);
2432
2422
Foundation_DIR = (Get-TargetProjectCMakeModules $Arch DynamicFoundation);
2433
2423
# TODO: ensure that host and target platform match
2434
2424
SwiftSyntax_DIR = (Get-HostProjectCMakeModules Compilers);
2435
2425
SwiftTesting_MACRO = " $ ( Get-BuildProjectBinaryCache TestingMacros) \TestingMacros.dll" ;
2426
+ SwiftTesting_INSTALL_NESTED_SUBDIR = " YES" ;
2436
2427
}
2437
2428
}
2438
2429
@@ -2470,32 +2461,6 @@ function Install-Platform([Platform]$Platform, $Archs) {
2470
2461
Copy-File $_.FullName " $PlatformResources \$ ( $_.BaseName ) .swiftmodule\$ ( Get-ModuleTriple $Arch ) $ ( $_.Extension ) "
2471
2462
}
2472
2463
}
2473
-
2474
- # Copy XCTest
2475
- $XCTestInstallRoot = [IO.Path ]::Combine((Get-PlatformRoot $Platform ), " Developer" , " Library" , " XCTest-development" )
2476
- switch ($Platform ) {
2477
- Windows {
2478
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\bin\XCTest.dll" " $XCTestInstallRoot \usr\$ ( $Arch.BinaryDir ) \"
2479
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\windows\XCTest.lib" " $XCTestInstallRoot \usr\lib\swift\windows\$ ( $Arch.LLVMName ) \"
2480
- }
2481
- default {
2482
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \libXCTest.so" " $XCTestInstallRoot \usr\lib\$ ( $Arch.BinaryDir ) \"
2483
- }
2484
- }
2485
- Copy-Directory " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \XCTest.swiftmodule" " $XCTestInstallRoot \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \"
2486
-
2487
- # Copy Testing
2488
- $SwiftTestingInstallRoot = [IO.Path ]::Combine((Get-PlatformRoot $Platform ), " Developer" , " Library" , " Testing-development" )
2489
- switch ($Platform ) {
2490
- Windows {
2491
- Copy-File " $ ( $Arch.SwiftTestingInstallRoot ) \usr\bin\Testing.dll" " $SwiftTestingInstallRoot \usr\$ ( $Arch.BinaryDir ) \"
2492
- Copy-File " $ ( $Arch.SwiftTestingInstallRoot ) \usr\lib\swift\windows\Testing.lib" " $SwiftTestingInstallRoot \usr\lib\swift\windows\$ ( $Arch.LLVMName ) \"
2493
- }
2494
- default {
2495
- Copy-File " $ ( $Arch.SwiftTestingInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \libTesting.so" " $SwiftTestingInstallRoot \usr\lib\$ ( $Arch.BinaryDir ) \"
2496
- }
2497
- }
2498
- Copy-Directory " $ ( $Arch.SwiftTestingInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \Testing.swiftmodule" " $SwiftTestingInstallRoot \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \"
2499
2464
}
2500
2465
}
2501
2466
0 commit comments