summaryrefslogtreecommitdiff
path: root/scripts/test
diff options
context:
space:
mode:
authorJay Phelps <hello@jayphelps.com>2019-08-20 15:27:58 -0500
committerHeejin Ahn <aheejin@gmail.com>2019-08-20 13:27:58 -0700
commitdce1fe8c16559437cae05c0dd782237474ca6082 (patch)
tree811e57a34951ad316072d7da8838461c25fbf465 /scripts/test
parent86b8cf6c299d0189d7819cf5eabb1ea03d34ff3a (diff)
downloadbinaryen-dce1fe8c16559437cae05c0dd782237474ca6082.tar.gz
binaryen-dce1fe8c16559437cae05c0dd782237474ca6082.tar.bz2
binaryen-dce1fe8c16559437cae05c0dd782237474ca6082.zip
Add initial support for anyref as an opaque type (#2294)
Another round of trying to push upstream things from my fork. This PR only adds support for anyref itself as an opaque type. It does NOT implement the full [reference types proposal](https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md)--so no table.get/set/grow/etc or ref.null, ref.func, etc. Figured it was easier to review and merge as we go, especially if I did something fundamentally wrong. *** I did put it under the `--enable-reference-types` flag as I imagine that even though this PR doesn't complete the full feature set, it probably is the right home. Lmk if not. I'll also be adding a few github comments to places I want to point out/question.
Diffstat (limited to 'scripts/test')
-rw-r--r--scripts/test/shared.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py
index 2440077a8..ad2f44c14 100644
--- a/scripts/test/shared.py
+++ b/scripts/test/shared.py
@@ -313,14 +313,14 @@ class Py2CalledProcessError(subprocess.CalledProcessError):
self.stderr = stderr
-def run_process(cmd, check=True, input=None, capture_output=False, *args, **kw):
+def run_process(cmd, check=True, input=None, capture_output=False, decode_output=True, *args, **kw):
if input and type(input) == str:
input = bytes(input, 'utf-8')
if capture_output:
kw['stdout'] = subprocess.PIPE
kw['stderr'] = subprocess.PIPE
ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
- if ret.stdout is not None:
+ if decode_output and ret.stdout is not None:
ret.stdout = ret.stdout.decode('utf-8')
if ret.stderr is not None:
ret.stderr = ret.stderr.decode('utf-8')