summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-27 13:48:12 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-27 13:48:32 -0800
commitf329e28d111ea3462fa89dacf53024fba1c52415 (patch)
treeed52b1944fc7b8703de86a794228555e7645c582
parent24992f477f21167efafdc8d5f1a2a9fd197baab6 (diff)
downloadbinaryen-f329e28d111ea3462fa89dacf53024fba1c52415.tar.gz
binaryen-f329e28d111ea3462fa89dacf53024fba1c52415.tar.bz2
binaryen-f329e28d111ea3462fa89dacf53024fba1c52415.zip
verify binary outputs are valid wasts
-rwxr-xr-xcheck.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/check.py b/check.py
index c1cbecbf6..db9f9b7ed 100755
--- a/check.py
+++ b/check.py
@@ -168,6 +168,11 @@ def binary_format_check(wast, verify_final_result=True):
subprocess.check_call(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
assert os.path.exists('ab.wast')
+ # make sure it is a valid wast
+ cmd = [os.path.join('bin', 'binaryen-shell'), 'ab.wast']
+ print ' ', ' '.join(cmd)
+ subprocess.check_call(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+
if verify_final_result:
expected = open(wast + '.fromBinary').read()
actual = open('ab.wast').read()