From 22548bf789359be1f3c14aa41ffd4a23fda38542 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Thu, 15 Sep 2016 15:49:03 -0700 Subject: Update s2wasm for 0xc changes (#698) Several updates for s2wasm and its tests: Add explicit drops where they are emitted by LLVM already Convert loops (which are still modeled in the old way by LLVM) to wrap them in an explicit block (for the exit label). This also allows simplifying the loop creation (no need to post-process the implicit block which is the loop's body). After the engines update to 0xc we should update LLVM to model loops in the 0xc way, but for now it remains compatible with 0xb and 0xc. Fix the order of the calls to setTee() when creating tee_locals Add an explicit drop when creating the _start entry function wrapper if needed Update dot_s and llvm_autogenerated tests to remove store-results optimization (and few other minor updates) Fix the test auto-updater to fail if subprocesses fail There still seems to be a validation failure when building libc (I think it's from the stricter drop rules, but it may be in the source rather than the compiler), but this at least makes Binaryen's tests pa --- scripts/support.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'scripts/support.py') diff --git a/scripts/support.py b/scripts/support.py index 7b61d5a03..43762fffa 100755 --- a/scripts/support.py +++ b/scripts/support.py @@ -142,10 +142,17 @@ def split_wast(wast): return ret -def run_command(cmd, expected_status=0, stderr=None): +def run_command(cmd, expected_status=0, stderr=None, expected_err=None): + if expected_err is not None: + assert stderr == subprocess.PIPE or stderr is None,\ + "Can't redirect stderr if using expected_err" + stderr = subprocess.PIPE print 'executing: ', ' '.join(cmd) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=stderr) out, err = proc.communicate() if proc.returncode != expected_status: raise Exception(('run_command failed', err)) + if expected_err is not None and err != expected_err: + raise Exception(('run_command unexpected stderr', + "expected '%s', actual '%s'" % (expected_err, err))) return out -- cgit v1.2.3