@@ -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
@@ -2349,15 +2335,18 @@ function Build-XCTest([Platform]$Platform, $Arch) {
2349
2335
Build-CMakeProject `
2350
2336
- Src $SourceCache \swift- corelibs- xctest `
2351
2337
- Bin $ (Get-TargetProjectBinaryCache $Arch XCTest) `
2352
- - InstallTo " $ ( $Arch .XCTestInstallRoot ) \ usr" `
2338
+ - InstallTo " $ ( [ IO.Path ]::Combine(( Get-PlatformRoot $Platform ) , " Developer " , " Library " , " XCTest-development " , " usr" ) ) " `
2353
2339
- Arch $Arch `
2354
2340
- Platform $Platform `
2355
2341
- UseBuiltCompilers Swift `
2356
2342
- Defines @ {
2343
+ BUILD_SHARED_LIBS = " YES" ;
2357
2344
CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2345
+ CMAKE_INSTALL_BINDIR = $Arch.BinaryDir ;
2358
2346
ENABLE_TESTING = " NO" ;
2359
2347
dispatch_DIR = $ (Get-TargetProjectCMakeModules $Arch Dispatch);
2360
2348
Foundation_DIR = $ (Get-TargetProjectCMakeModules $Arch DynamicFoundation);
2349
+ XCTest_INSTALL_NESTED_SUBDIR = " YES" ;
2361
2350
}
2362
2351
}
2363
2352
@@ -2389,18 +2378,20 @@ function Build-Testing([Platform]$Platform, $Arch) {
2389
2378
Build-CMakeProject `
2390
2379
- Src $SourceCache \swift- testing `
2391
2380
- Bin (Get-TargetProjectBinaryCache $Arch Testing) `
2392
- - InstallTo " $ ( $Arch .SwiftTestingInstallRoot ) \ usr" `
2381
+ - InstallTo " $ ( [ IO.Path ]::Combine(( Get-PlatformRoot $Platform ) , " Developer " , " Library " , " Testing-development " , " usr" ) ) " `
2393
2382
- Arch $Arch `
2394
2383
- Platform $Platform `
2395
2384
- UseBuiltCompilers C, CXX, Swift `
2396
2385
- Defines @ {
2397
2386
BUILD_SHARED_LIBS = " YES" ;
2398
2387
CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2388
+ CMAKE_INSTALL_BINDIR = $Arch.BinaryDir ;
2399
2389
dispatch_DIR = (Get-TargetProjectCMakeModules $Arch Dispatch);
2400
2390
Foundation_DIR = (Get-TargetProjectCMakeModules $Arch DynamicFoundation);
2401
2391
# TODO: ensure that host and target platform match
2402
2392
SwiftSyntax_DIR = (Get-HostProjectCMakeModules Compilers);
2403
2393
SwiftTesting_MACRO = " $ ( Get-BuildProjectBinaryCache TestingMacros) \TestingMacros.dll" ;
2394
+ SwiftTesting_INSTALL_NESTED_SUBDIR = " YES" ;
2404
2395
}
2405
2396
}
2406
2397
@@ -2438,33 +2429,6 @@ function Install-Platform([Platform]$Platform, $Archs) {
2438
2429
Copy-File $_.FullName " $PlatformResources \$ ( $_.BaseName ) .swiftmodule\$ ( Get-ModuleTriple $Arch ) $ ( $_.Extension ) "
2439
2430
}
2440
2431
}
2441
-
2442
- # Copy XCTest
2443
- $XCTestInstallRoot = [IO.Path ]::Combine((Get-PlatformRoot $Platform ), " Developer" , " Library" , " XCTest-development" )
2444
- switch ($Platform ) {
2445
- Windows {
2446
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\bin\XCTest.dll" " $XCTestInstallRoot \usr\$ ( $Arch.BinaryDir ) \"
2447
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\windows\XCTest.lib" " $XCTestInstallRoot \usr\lib\swift\windows\$ ( $Arch.LLVMName ) \"
2448
- }
2449
- default {
2450
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \libXCTest.so" " $XCTestInstallRoot \usr\lib\$ ( $Arch.BinaryDir ) \"
2451
- }
2452
- }
2453
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \$ ( $Arch.LLVMName ) \XCTest.swiftmodule" " $XCTestInstallRoot \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \XCTest.swiftmodule\$ ( $Arch.LLVMTarget ) .swiftmodule"
2454
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \$ ( $Arch.LLVMName ) \XCTest.swiftdoc" " $XCTestInstallRoot \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \XCTest.swiftmodule\$ ( $Arch.LLVMTarget ) .swiftdoc"
2455
-
2456
- # Copy Testing
2457
- $SwiftTestingInstallRoot = [IO.Path ]::Combine((Get-PlatformRoot $Platform ), " Developer" , " Library" , " Testing-development" )
2458
- switch ($Platform ) {
2459
- Windows {
2460
- Copy-File " $ ( $Arch.SwiftTestingInstallRoot ) \usr\bin\Testing.dll" " $SwiftTestingInstallRoot \usr\$ ( $Arch.BinaryDir ) \"
2461
- Copy-File " $ ( $Arch.SwiftTestingInstallRoot ) \usr\lib\swift\windows\Testing.lib" " $SwiftTestingInstallRoot \usr\lib\swift\windows\$ ( $Arch.LLVMName ) \"
2462
- }
2463
- default {
2464
- Copy-File " $ ( $Arch.SwiftTestingInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \libTesting.so" " $SwiftTestingInstallRoot \usr\lib\$ ( $Arch.BinaryDir ) \"
2465
- }
2466
- }
2467
- Copy-Directory " $ ( $Arch.SwiftTestingInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \Testing.swiftmodule" " $SwiftTestingInstallRoot \usr\lib\swift\$ ( $Platform.ToString ().ToLowerInvariant()) \"
2468
2432
}
2469
2433
}
2470
2434
0 commit comments