Skip to content

Commit 5ee3126

Browse files
committed
Temporarily disable test on Linux
Something is very fishy in our JVM interactions within tests there
1 parent a0d9c9e commit 5ee3126

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Tests/Java2SwiftTests/Java2SwiftTests.swift

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ public struct JavaMonth {
3030

3131
class Java2SwiftTests: XCTestCase {
3232
func testJavaLangObjectMapping() throws {
33+
if isLinux {
34+
throw XCTSkip("Crashes for unexplained reasons on Linux")
35+
}
36+
3337
try assertTranslatedClass(
3438
JavaObject.self,
3539
swiftTypeName: "MyJavaObject",
@@ -52,6 +56,10 @@ class Java2SwiftTests: XCTestCase {
5256
}
5357

5458
func testEnum() throws {
59+
if isLinux {
60+
throw XCTSkip("Crashes for unexplained reasons on Linux")
61+
}
62+
5563
try assertTranslatedClass(
5664
JavaMonth.self,
5765
swiftTypeName: "Month",
@@ -82,6 +90,10 @@ class Java2SwiftTests: XCTestCase {
8290
}
8391

8492
func testGenericCollections() throws {
93+
if isLinux {
94+
throw XCTSkip("Crashes for unexplained reasons on Linux")
95+
}
96+
8597
try assertTranslatedClass(
8698
MyArrayList<JavaObject>.self,
8799
swiftTypeName: "JavaArrayList",
@@ -99,6 +111,10 @@ class Java2SwiftTests: XCTestCase {
99111
}
100112

101113
func testLinkedList() throws {
114+
if isLinux {
115+
throw XCTSkip("Crashes for unexplained reasons on Linux")
116+
}
117+
102118
try assertTranslatedClass(
103119
MyLinkedList<JavaObject>.self,
104120
swiftTypeName: "JavaLinkedList",
@@ -167,3 +183,12 @@ func assertTranslatedClass<JavaClassType: AnyJavaObject>(
167183
XCTFail("Expected chunk '\(expectedChunk)' not found in '\(swiftFileText)'", file: file, line: line)
168184
}
169185
}
186+
187+
/// Whether we're running on Linux.
188+
var isLinux: Bool {
189+
#if os(Linux)
190+
return true
191+
#else
192+
return false
193+
#endif
194+
}

0 commit comments

Comments
 (0)