Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions check.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ def run_unittest():
def run_lit():
def run():
lit_script = os.path.join(shared.options.binaryen_bin, 'binaryen-lit')
lit_tests = os.path.join(shared.options.binaryen_root, 'test', 'lit')
lit_tests = shared.get_tests(shared.get_test_dir('lit'), extensions=support.LIT_TEST_SUFFIXES, recursive=True)
# lit expects to be run as its own executable
cmd = [sys.executable, lit_script, lit_tests, '-vv']
cmd = [sys.executable, lit_script, '-vv'] + lit_tests
result = subprocess.run(cmd)
if result.returncode != 0:
shared.num_failures += 1
Expand Down
3 changes: 3 additions & 0 deletions scripts/test/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ def to_end(j):
return ret


LIT_TEST_SUFFIXES = frozenset({'.wat', '.wast', '.test'})


# write a split wast from split_wast. the wast may be binary if the original
# file was binary
def write_wast(filename, wast, asserts=[]):
Expand Down
5 changes: 4 additions & 1 deletion test/lit/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
import sys
import lit.formats

sys.path.append(config.binaryen_src_root)
from scripts.test.support import LIT_TEST_SUFFIXES

config.name = "Binaryen lit tests"
config.test_format = lit.formats.ShTest()

config.suffixes = ['.wat', '.wast', '.test']
config.suffixes = LIT_TEST_SUFFIXES

config.test_source_root = os.path.dirname(__file__)
config.test_exec_root = os.path.join(config.binaryen_build_root, 'out', 'test')
Expand Down
Loading