@@ -238,8 +238,6 @@ $ArchX64 = @{
238
238
LLVMTarget = " x86_64-unknown-windows-msvc" ;
239
239
CMakeName = " AMD64" ;
240
240
BinaryDir = " bin64" ;
241
- XCTestInstallRoot = " $BinaryCache \x64\Windows.platform\Developer\Library\XCTest-development" ;
242
- SwiftTestingInstallRoot = " $BinaryCache \x64\Windows.platform\Developer\Library\Testing-development" ;
243
241
ToolchainInstallRoot = " $BinaryCache \x64\toolchains\$ProductVersion +$Variant " ;
244
242
Cache = @ {};
245
243
}
@@ -251,8 +249,6 @@ $ArchX86 = @{
251
249
LLVMTarget = " i686-unknown-windows-msvc" ;
252
250
CMakeName = " i686" ;
253
251
BinaryDir = " bin32" ;
254
- XCTestInstallRoot = " $BinaryCache \x86\Windows.platform\Developer\Library\XCTest-development" ;
255
- SwiftTestingInstallRoot = " $BinaryCache \x86\Windows.platform\Developer\Library\Testing-development" ;
256
252
Cache = @ {};
257
253
}
258
254
@@ -263,9 +259,7 @@ $ArchARM64 = @{
263
259
LLVMTarget = " aarch64-unknown-windows-msvc" ;
264
260
CMakeName = " ARM64" ;
265
261
BinaryDir = " bin64a" ;
266
- XCTestInstallRoot = " $BinaryCache \arm64\Windows.platform\Developer\Library\XCTest-development" ;
267
262
ToolchainInstallRoot = " $BinaryCache \arm64\toolchains\$ProductVersion +$Variant " ;
268
- SwiftTestingInstallRoot = " $BinaryCache \arm64\Windows.platform\Developer\Library\Testing-development" ;
269
263
Cache = @ {};
270
264
}
271
265
@@ -276,8 +270,6 @@ $AndroidARM64 = @{
276
270
LLVMName = " aarch64" ;
277
271
LLVMTarget = " aarch64-unknown-linux-android$AndroidAPILevel " ;
278
272
ShortName = " arm64" ;
279
- XCTestInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\Library\XCTest-development" ;
280
- SwiftTestingInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\Library\Testing-development" ;
281
273
Cache = @ {};
282
274
}
283
275
@@ -288,8 +280,6 @@ $AndroidARMv7 = @{
288
280
LLVMName = " armv7" ;
289
281
LLVMTarget = " armv7-unknown-linux-androideabi$AndroidAPILevel " ;
290
282
ShortName = " armv7" ;
291
- XCTestInstallRoot = " $BinaryCache \armv7\Android.platform\Developer\Library\XCTest-development" ;
292
- SwiftTestingInstallRoot = " $BinaryCache \armv7\Android.platform\Developer\Library\Testing-development" ;
293
283
Cache = @ {};
294
284
}
295
285
@@ -300,8 +290,6 @@ $AndroidX86 = @{
300
290
LLVMName = " i686" ;
301
291
LLVMTarget = " i686-unknown-linux-android$AndroidAPILevel " ;
302
292
ShortName = " x86" ;
303
- XCTestInstallRoot = " $BinaryCache \x86\Android.platform\Developer\Library\XCTest-development" ;
304
- SwiftTestingInstallRoot = " $BinaryCache \x86\Android.platform\Developer\Library\Testing-development" ;
305
293
Cache = @ {};
306
294
}
307
295
@@ -312,8 +300,6 @@ $AndroidX64 = @{
312
300
LLVMName = " x86_64" ;
313
301
LLVMTarget = " x86_64-unknown-linux-android$AndroidAPILevel " ;
314
302
ShortName = " x64" ;
315
- XCTestInstallRoot = " $BinaryCache \x64\Android.platform\Developer\Library\XCTest-development" ;
316
- SwiftTestingInstallRoot = " $BinaryCache \x64\Android.platform\Developer\Library\Testing-development" ;
317
303
Cache = @ {};
318
304
}
319
305
@@ -2384,15 +2370,18 @@ function Build-XCTest([Platform]$Platform, $Arch) {
2384
2370
Build-CMakeProject `
2385
2371
- Src $SourceCache \swift- corelibs- xctest `
2386
2372
- Bin $ (Get-TargetProjectBinaryCache $Arch XCTest) `
2387
- - InstallTo " $ ( $Arch .XCTestInstallRoot ) \ usr" `
2373
+ - InstallTo " $ ( [ IO.Path ]::Combine(( Get-PlatformRoot $Platform ) , " Developer " , " Library " , " XCTest-development " , " usr" ) ) " `
2388
2374
- Arch $Arch `
2389
2375
- Platform $Platform `
2390
2376
- UseBuiltCompilers Swift `
2391
2377
- Defines @ {
2378
+ BUILD_SHARED_LIBS = " YES" ;
2392
2379
CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2380
+ CMAKE_INSTALL_BINDIR = $Arch.BinaryDir ;
2393
2381
ENABLE_TESTING = " NO" ;
2394
2382
dispatch_DIR = $ (Get-TargetProjectCMakeModules $Arch Dispatch);
2395
2383
Foundation_DIR = $ (Get-TargetProjectCMakeModules $Arch DynamicFoundation);
2384
+ XCTest_INSTALL_NESTED_SUBDIR = " YES" ;
2396
2385
}
2397
2386
}
2398
2387
@@ -2424,18 +2413,20 @@ function Build-Testing([Platform]$Platform, $Arch) {
2424
2413
Build-CMakeProject `
2425
2414
- Src $SourceCache \swift- testing `
2426
2415
- Bin (Get-TargetProjectBinaryCache $Arch Testing) `
2427
- - InstallTo " $ ( $Arch .SwiftTestingInstallRoot ) \ usr" `
2416
+ - InstallTo " $ ( [ IO.Path ]::Combine(( Get-PlatformRoot $Platform ) , " Developer " , " Library " , " Testing-development " , " usr" ) ) " `
2428
2417
- Arch $Arch `
2429
2418
- Platform $Platform `
2430
2419
- UseBuiltCompilers C, CXX, Swift `
2431
2420
- Defines @ {
2432
2421
BUILD_SHARED_LIBS = " YES" ;
2433
2422
CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2423
+ CMAKE_INSTALL_BINDIR = $Arch.BinaryDir ;
2434
2424
dispatch_DIR = (Get-TargetProjectCMakeModules $Arch Dispatch);
2435
2425
Foundation_DIR = (Get-TargetProjectCMakeModules $Arch DynamicFoundation);
2436
2426
# TODO: ensure that host and target platform match
2437
2427
SwiftSyntax_DIR = (Get-HostProjectCMakeModules Compilers);
2438
2428
SwiftTesting_MACRO = " $ ( Get-BuildProjectBinaryCache TestingMacros) \TestingMacros.dll" ;
2429
+ SwiftTesting_INSTALL_NESTED_SUBDIR = " YES" ;
2439
2430
}
2440
2431
}
2441
2432
@@ -2473,32 +2464,6 @@ function Install-Platform([Platform]$Platform, $Archs) {
2473
2464
Copy-File $_.FullName " $PlatformResources \$ ( $_.BaseName ) .swiftmodule\$ ( Get-ModuleTriple $Arch ) $ ( $_.Extension ) "
2474
2465
}
2475
2466
}
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()) \"
2502
2467
}
2503
2468
}
2504
2469
0 commit comments