diff --git a/Tests/WASITests/WASITests.swift b/Tests/WASITests/WASITests.swift index 2cd5ef94..f8ae1606 100644 --- a/Tests/WASITests/WASITests.swift +++ b/Tests/WASITests/WASITests.swift @@ -2,10 +2,37 @@ import Testing @testable import WASI +enum TargetPlatform { + case android + + func isCurrentPlatform() -> Bool { + switch self { + case .android: + #if os(Android) + return true + #else + return false + #endif + } + } +} + +extension Trait where Self == ConditionTrait { + static func disabled( + _ comment: Comment? = nil, + sourceLocation: SourceLocation = #_sourceLocation, + platforms: [TargetPlatform] + ) -> Self { + return .disabled(comment, sourceLocation: sourceLocation) { + platforms.contains { $0.isCurrentPlatform() } + } + } +} + @Suite struct WASITests { #if !os(Windows) - @Test + @Test(.disabled("XFAILED regression on Android with different error value thrown for `link-secret-dir-b/secret-c.txt`", platforms: [.android])) func pathOpen() throws { let t = try TestSupport.TemporaryDirectory()