Skip to content

Commit 551a478

Browse files
authored
skip a couple of tests when running in an environment that does not support changing the working directory (#6310)
motivation: stable ci changes: skip a couple of new tests that are sensitive to env where we cannot change the working directory
1 parent 7b37649 commit 551a478

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Tests/CommandsTests/PackageRegistryToolTests.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,13 @@ final class PackageRegistryToolTests: CommandsTestCase {
417417
}
418418

419419
func testPublishingUnsignedPackage() throws {
420+
#if os(Linux)
421+
// needed for archiving
422+
guard SPM_posix_spawn_file_actions_addchdir_np_supported() else {
423+
throw XCTSkip("working directory not supported on this platform")
424+
}
425+
#endif
426+
420427
let packageIdentity = "test.my-package"
421428
let version = "0.1.0"
422429
let registryURL = "https://packages.example.com"
@@ -589,6 +596,13 @@ final class PackageRegistryToolTests: CommandsTestCase {
589596
"skipping because test environment doesn't support concurrency"
590597
)
591598

599+
#if os(Linux)
600+
// needed for archiving
601+
guard SPM_posix_spawn_file_actions_addchdir_np_supported() else {
602+
throw XCTSkip("working directory not supported on this platform")
603+
}
604+
#endif
605+
592606
let observabilityScope = ObservabilitySystem.makeForTesting().topScope
593607

594608
let packageIdentity = "test.my-package"

0 commit comments

Comments
 (0)