Skip to content

Commit 0315c86

Browse files
Tests: Hard-skip spectests on Android
1 parent fe7c700 commit 0315c86

File tree

2 files changed

+35
-31
lines changed

2 files changed

+35
-31
lines changed

Tests/WasmKitTests/FuzzTranslatorRegressionTests.swift

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,20 @@
2323
}
2424
}
2525

26-
@Test(
27-
.disabled("unable to run fuzz translator regression tests on Android due to missing files on emulator", platforms: [.android]),
28-
arguments: try failCases()
29-
)
30-
func run(test: Case) throws {
31-
let data = try Data(contentsOf: test.path)
32-
do {
33-
try WasmKitFuzzing.fuzzInstantiation(bytes: Array(data))
34-
} catch {
35-
// Skip exceptions without crash
26+
#if !os(Android)
27+
@Test(
28+
.disabled("unable to run fuzz translator regression tests on Android due to missing files on emulator", platforms: [.android]),
29+
arguments: try failCases()
30+
)
31+
func run(test: Case) throws {
32+
let data = try Data(contentsOf: test.path)
33+
do {
34+
try WasmKitFuzzing.fuzzInstantiation(bytes: Array(data))
35+
} catch {
36+
// Skip exceptions without crash
37+
}
3638
}
37-
}
39+
#endif
3840
}
3941

4042
#endif

Tests/WasmKitTests/SpectestTests.swift

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,28 @@
1919
]
2020
}
2121

22-
@Test(
23-
.disabled("unable to run spectest on Android due to missing files on emulator", platforms: [.android]),
24-
arguments: try SpectestDiscovery(path: SpectestTests.testPaths).discover()
25-
)
26-
func run(test: TestCase) throws {
27-
let defaultConfig = EngineConfiguration()
28-
let runner = try SpectestRunner(configuration: defaultConfig)
29-
try runner.run(test: test, reporter: NullSpectestProgressReporter())
30-
}
22+
#if !os(Android)
23+
@Test(
24+
.disabled("unable to run spectest on Android due to missing files on emulator", platforms: [.android]),
25+
arguments: try SpectestDiscovery(path: SpectestTests.testPaths).discover()
26+
)
27+
func run(test: TestCase) throws {
28+
let defaultConfig = EngineConfiguration()
29+
let runner = try SpectestRunner(configuration: defaultConfig)
30+
try runner.run(test: test, reporter: NullSpectestProgressReporter())
31+
}
3132

32-
@Test(
33-
.disabled("unable to run spectest on Android due to missing files on emulator", platforms: [.android]),
34-
arguments: try SpectestDiscovery(path: SpectestTests.testPaths).discover()
35-
)
36-
func runWithTokenThreading(test: TestCase) throws {
37-
let defaultConfig = EngineConfiguration()
38-
guard defaultConfig.threadingModel != .token else { return }
39-
// Sanity check that non-default threading models work.
40-
let runner = try SpectestRunner(configuration: defaultConfig)
41-
try runner.run(test: test, reporter: NullSpectestProgressReporter())
42-
}
33+
@Test(
34+
.disabled("unable to run spectest on Android due to missing files on emulator", platforms: [.android]),
35+
arguments: try SpectestDiscovery(path: SpectestTests.testPaths).discover()
36+
)
37+
func runWithTokenThreading(test: TestCase) throws {
38+
let defaultConfig = EngineConfiguration()
39+
guard defaultConfig.threadingModel != .token else { return }
40+
// Sanity check that non-default threading models work.
41+
let runner = try SpectestRunner(configuration: defaultConfig)
42+
try runner.run(test: test, reporter: NullSpectestProgressReporter())
43+
}
44+
#endif
4345
}
4446
#endif

0 commit comments

Comments
 (0)