Skip to content

Commit d8d8aba

Browse files
committed
Enable Windows CI
FileOperationsTestWindows.testPermissions fails on Windows in a container environment with Hyper-V isolated containers; see https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/persistent-storage#permissions for some potentially-relevant information. Skip it if we detect we're in a container. Closes #223
1 parent 1b8167d commit d8d8aba

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/pull_request.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ jobs:
1010
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
1111
with:
1212
linux_exclude_swift_versions: '[{"swift_version": "5.8"}]'
13-
# https://github.com/apple/swift-system/issues/223
14-
enable_windows_checks: false
1513
soundness:
1614
name: Soundness
1715
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main

Tests/SystemTests/FileOperationsTestWindows.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ final class FileOperationsTestWindows: XCTestCase {
205205

206206
/// Test that setting permissions on a file works as expected
207207
func testPermissions() throws {
208+
// See https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/persistent-storage#permissions
209+
try XCTSkipIf(NSUserName() == "ContainerAdministrator", "containers use a different permission model")
210+
208211
try FilePermissions.withCreationMask([]) {
209212
try withTemporaryFilePath(basename: "testPermissions") { path in
210213
let tests = [

0 commit comments

Comments
 (0)