@@ -279,7 +279,7 @@ final class PackageRegistryToolTests: CommandsTestCase {
279
279
280
280
// TODO: Test example with login and password
281
281
282
- func testArchiving( ) throws {
282
+ func testArchiving( ) async throws {
283
283
#if os(Linux)
284
284
// needed for archiving
285
285
guard SPM_posix_spawn_file_actions_addchdir_np_supported ( ) else {
@@ -293,7 +293,7 @@ final class PackageRegistryToolTests: CommandsTestCase {
293
293
let metadataFilename = SwiftPackageRegistryTool . Publish. metadataFilename
294
294
295
295
// git repo
296
- try withTemporaryDirectory { temporaryDirectory in
296
+ try await withTemporaryDirectory { temporaryDirectory in
297
297
let packageDirectory = temporaryDirectory. appending ( " MyPackage " )
298
298
try localFileSystem. createDirectory ( packageDirectory)
299
299
@@ -320,12 +320,12 @@ final class PackageRegistryToolTests: CommandsTestCase {
320
320
observabilityScope: observability. topScope
321
321
)
322
322
323
- try validatePackageArchive ( at: archivePath)
323
+ try await validatePackageArchive ( at: archivePath)
324
324
XCTAssertTrue ( archivePath. isDescendant ( of: workingDirectory) )
325
325
}
326
326
327
327
// not a git repo
328
- try withTemporaryDirectory { temporaryDirectory in
328
+ try await withTemporaryDirectory { temporaryDirectory in
329
329
let packageDirectory = temporaryDirectory. appending ( " MyPackage " )
330
330
try localFileSystem. createDirectory ( packageDirectory)
331
331
@@ -350,11 +350,11 @@ final class PackageRegistryToolTests: CommandsTestCase {
350
350
observabilityScope: observability. topScope
351
351
)
352
352
353
- try validatePackageArchive ( at: archivePath)
353
+ try await validatePackageArchive ( at: archivePath)
354
354
}
355
355
356
356
// canonical metadata location
357
- try withTemporaryDirectory { temporaryDirectory in
357
+ try await withTemporaryDirectory { temporaryDirectory in
358
358
let packageDirectory = temporaryDirectory. appending ( " MyPackage " )
359
359
try localFileSystem. createDirectory ( packageDirectory)
360
360
@@ -385,17 +385,17 @@ final class PackageRegistryToolTests: CommandsTestCase {
385
385
observabilityScope: observability. topScope
386
386
)
387
387
388
- let extractedPath = try validatePackageArchive ( at: archivePath)
388
+ let extractedPath = try await validatePackageArchive ( at: archivePath)
389
389
XCTAssertFileExists ( extractedPath. appending ( component: metadataFilename) )
390
390
}
391
391
392
392
@discardableResult
393
- func validatePackageArchive( at archivePath: AbsolutePath ) throws -> AbsolutePath {
393
+ func validatePackageArchive( at archivePath: AbsolutePath ) async throws -> AbsolutePath {
394
394
XCTAssertFileExists ( archivePath)
395
395
let archiver = ZipArchiver ( fileSystem: localFileSystem)
396
396
let extractPath = archivePath. parentDirectory. appending ( component: UUID ( ) . uuidString)
397
397
try localFileSystem. createDirectory ( extractPath)
398
- try temp_await { archiver. extract ( from: archivePath, to: extractPath, completion : $0 ) }
398
+ try await archiver. extract ( from: archivePath, to: extractPath)
399
399
try localFileSystem. stripFirstLevel ( of: extractPath)
400
400
XCTAssertFileExists ( extractPath. appending ( " Package.swift " ) )
401
401
return extractPath
@@ -550,7 +550,7 @@ final class PackageRegistryToolTests: CommandsTestCase {
550
550
let archiver = ZipArchiver ( fileSystem: localFileSystem)
551
551
let extractPath = archivePath. parentDirectory. appending ( component: UUID ( ) . uuidString)
552
552
try localFileSystem. createDirectory ( extractPath)
553
- try temp_await { archiver. extract ( from: archivePath, to: extractPath, completion : $0 ) }
553
+ try await archiver. extract ( from: archivePath, to: extractPath)
554
554
try localFileSystem. stripFirstLevel ( of: extractPath)
555
555
556
556
let manifestInArchive = try localFileSystem. readFileContents ( extractPath. appending ( manifestFile) ) . contents
@@ -963,7 +963,7 @@ final class PackageRegistryToolTests: CommandsTestCase {
963
963
let archiver = ZipArchiver ( fileSystem: localFileSystem)
964
964
let extractPath = archivePath. parentDirectory. appending ( component: UUID ( ) . uuidString)
965
965
try localFileSystem. createDirectory ( extractPath)
966
- try temp_await { archiver. extract ( from: archivePath, to: extractPath, completion : $0 ) }
966
+ try await archiver. extract ( from: archivePath, to: extractPath)
967
967
try localFileSystem. stripFirstLevel ( of: extractPath)
968
968
969
969
let manifestSignature = try ManifestSignatureParser . parse (
0 commit comments