summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-04-13 07:58:10 -0700
committerGitHub <noreply@github.com>2020-04-13 07:58:10 -0700
commitd7d251b75c46a814b764ff2ded0d9c5a275a7e46 (patch)
tree2be2f8c988b3057dc85e3e717276043de15e5397 /check.py
parent53c70d9ccd56d9d28eb65ccc5954024b6b0e921b (diff)
downloadbinaryen-d7d251b75c46a814b764ff2ded0d9c5a275a7e46.tar.gz
binaryen-d7d251b75c46a814b764ff2ded0d9c5a275a7e46.tar.bz2
binaryen-d7d251b75c46a814b764ff2ded0d9c5a275a7e46.zip
Use std::cout for interpreter trap logging (#2755)
We used std::cerr as a workaround for that this logging interfered with spec testing. But it's easy enough to filter out this stuff for the spec tests. The benefit to using std::cout is that as you can see in the test output here, this is relevant test output - it's not a side channel for debugging. If the rest of the interpreter output is in std::cout but only traps are in std::cerr then they might end up out of order etc., so best to keep them all together. This will allow easier additions of tests for fuzz testcases
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/check.py b/check.py
index 5436e7639..0629d29d8 100755
--- a/check.py
+++ b/check.py
@@ -197,7 +197,11 @@ def run_spec_tests():
def run_spec_test(wast):
cmd = shared.WASM_SHELL + [wast]
- return support.run_command(cmd, stderr=subprocess.PIPE)
+ output = support.run_command(cmd, stderr=subprocess.PIPE)
+ # filter out binaryen interpreter logging that the spec suite
+ # doesn't expect
+ filtered = [line for line in output.splitlines() if not line.startswith('[trap')]
+ return '\n'.join(filtered) + '\n'
def run_opt_test(wast):
# check optimization validation