Skip to content
Merged
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
11 changes: 6 additions & 5 deletions scripts/test/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def parse_args(args):
help=('If specified, all unfreed (but still referenced) pointers at the'
' end of execution are considered memory leaks. Default: disabled.'))
parser.add_argument(
'--spec-test', action='append', nargs='*', default=[], dest='spec_tests',
'--spec-test', action='append', default=[], dest='spec_tests',
help='Names specific spec tests to run.')
parser.add_argument(
'positional_args', metavar='TEST_SUITE', nargs='*',
Expand Down Expand Up @@ -159,7 +159,6 @@ def warn(text):

if not os.path.exists(options.out_dir):
os.makedirs(options.out_dir)
os.chdir(options.out_dir)


# Finds the given executable 'program' in PATH.
Expand Down Expand Up @@ -384,10 +383,12 @@ def get_tests(test_dir, extensions=[], recursive=False):
return sorted(tests)


if not options.spec_tests:
options.spec_tests = get_tests(get_test_dir('spec'), ['.wast'])
if options.spec_tests:
options.spec_tests = [os.path.abspath(t) for t in options.spec_tests]
else:
options.spec_tests = options.spec_tests[:]
options.spec_tests = get_tests(get_test_dir('spec'), ['.wast'])

os.chdir(options.out_dir)

# 11/27/2019: We updated the spec test suite to upstream spec repo. For some
# files that started failing after this update, we added the new files to this
Expand Down