summaryrefslogtreecommitdiff
path: root/test/run-tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/run-tests.py')
-rwxr-xr-xtest/run-tests.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/test/run-tests.py b/test/run-tests.py
index 1b49f4cc..9d01b564 100755
--- a/test/run-tests.py
+++ b/test/run-tests.py
@@ -88,6 +88,11 @@ TOOLS = {
('RUN', '%(wasm-interp)s %(temp_file)s.wasm --run-all-exports'),
('VERBOSE-ARGS', ['--print-cmd', '-v']),
],
+ 'run-interp-wasi': [
+ ('RUN', '%(wat2wasm)s %(in_file)s -o %(temp_file)s.wasm'),
+ ('RUN', '%(wasm-interp)s --wasi %(temp_file)s.wasm'),
+ ('VERBOSE-ARGS', ['--print-cmd', '-v']),
+ ],
'run-interp-spec': [
('RUN', '%(wast2json)s %(in_file)s -o %(temp_file)s.json'),
('RUN', '%(spectest-interp)s %(temp_file)s.json'),
@@ -673,9 +678,13 @@ class Status(object):
sys.stderr.write('\r%s\r' % (' ' * self.last_length))
-def FindTestFiles(ext, filter_pattern_re):
+def FindTestFiles(ext, filter_pattern_re, exclude_dirs):
tests = []
for root, dirs, files in os.walk(TEST_DIR):
+ for ex in exclude_dirs:
+ if ex in dirs:
+ # Filtering out dirs here causes os.walk not to descend into them
+ dirs.remove(ex)
for f in files:
path = os.path.join(root, f)
if os.path.splitext(f)[1] == ext:
@@ -908,12 +917,17 @@ def main(args):
parser.error('--stop-interactive only works with -j1')
if options.patterns:
+ exclude_dirs = []
pattern_re = '|'.join(
fnmatch.translate('*%s*' % p) for p in options.patterns)
else:
pattern_re = '.*'
+ # By default, exclude wasi tests because WASI support is not include
+ # by int the build by default.
+ # TODO(sbc): Find some way to detect the WASI support.
+ exclude_dirs = ['wasi']
- test_names = FindTestFiles('.txt', pattern_re)
+ test_names = FindTestFiles('.txt', pattern_re, exclude_dirs)
if options.list:
for test_name in test_names: