summaryrefslogtreecommitdiff
path: root/test/run-wasmdump.py
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-10-24 14:02:18 -0700
committerBen Smith <binji@chromium.org>2016-11-03 13:05:36 -0700
commit5a1be55f5a50c1df5cdce6412a589bafa5fab1df (patch)
treeec4f75ff60d7363331dc45e615eb07d199e0f2da /test/run-wasmdump.py
parentfe4f7d4f0d85826f8babbda76607654380cfc050 (diff)
downloadwabt-5a1be55f5a50c1df5cdce6412a589bafa5fab1df.tar.gz
wabt-5a1be55f5a50c1df5cdce6412a589bafa5fab1df.tar.bz2
wabt-5a1be55f5a50c1df5cdce6412a589bafa5fab1df.zip
Use a new format for the spec JSON writer/parser
The previous spec JSON format was defined around modules. This is because the previous spec tests would only run assertions on the most recently read module. In addition, the previous spec writer would write the assertions as new exported functions in the module, and run those. The primary reason for doing this was to allow for passing/returning i64 values, which was necessary to test in a JavaScript host. Now that the primary host for running the spec tests is wasm-interp, we no longer need do bundle assertions into the module. Also, some of the new spec tests allow running exported functions on a module that is not the most-recently-read module. The new spec test format is now defined around commands. The commands map directly to the spec format commands, e.g. `module`, `assert_invalid`, `assert_trap`, etc.
Diffstat (limited to 'test/run-wasmdump.py')
-rwxr-xr-xtest/run-wasmdump.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/run-wasmdump.py b/test/run-wasmdump.py
index ec0628bb..7055e59a 100755
--- a/test/run-wasmdump.py
+++ b/test/run-wasmdump.py
@@ -16,7 +16,6 @@
#
import argparse
-import json
import os
import sys
import tempfile
@@ -80,9 +79,7 @@ def main(args):
wast2wasm.RunWithArgs('-o', out_file, filename)
if options.spec:
- with open(out_file) as json_file:
- json_data = json.load(json_file)
- wasm_files = [m['filename'] for m in json_data['modules']]
+ wasm_files = utils.GetModuleFilenamesFromSpecJSON(out_file)
wasm_files = [utils.ChangeDir(f, out_dir) for f in wasm_files]
else:
wasm_files = [out_file]