Skip to content

Commit

Permalink
Tests: Skip redundant spectest parsing/lexing tests by default
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Oct 26, 2024
1 parent 2c126af commit 080b873
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tests/WATTests/LexerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ class LexerTests: XCTestCase {
}

func testLexSpectest() throws {
// NOTE: We do the same check as a part of the EncoderTests, so it's
// usually redundant and time-wasting to run this test every time.
// Keeping it here just for local unit testing purposes.
try XCTSkipIf(
ProcessInfo.processInfo.environment["WASMKIT_LEXER_SPECTEST"] != "1"
)
var failureCount = 0
for filePath in Spectest.wastFiles() {
print("Lexing \(filePath.path)...")
Expand Down
6 changes: 6 additions & 0 deletions Tests/WATTests/ParserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ class ParserTests: XCTestCase {
}

func testParseSpectest() throws {
// NOTE: We do the same check as a part of the EncoderTests, so it's
// usually redundant and time-wasting to run this test every time.
// Keeping it here just for local unit testing purposes.
try XCTSkipIf(
ProcessInfo.processInfo.environment["WASMKIT_PARSER_SPECTEST"] != "1"
)
var failureCount = 0
var totalCount = 0
for filePath in Spectest.wastFiles(include: []) {
Expand Down

0 comments on commit 080b873

Please sign in to comment.