summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-10-31 20:22:42 -0700
committerAlon Zakai <alonzakai@gmail.com>2015-10-31 20:22:42 -0700
commitcfb0cefcf93417a30c03bca7ff0a6c4d0428b1b5 (patch)
treec4dbaf88f84420d2c4f4c82b1b63c1437ccc8d38 /check.py
parent4f4a650c67d5105fedf44b83c06a51102947c045 (diff)
downloadbinaryen-cfb0cefcf93417a30c03bca7ff0a6c4d0428b1b5.tar.gz
binaryen-cfb0cefcf93417a30c03bca7ff0a6c4d0428b1b5.tar.bz2
binaryen-cfb0cefcf93417a30c03bca7ff0a6c4d0428b1b5.zip
debugging
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/check.py b/check.py
index d05ae44ac..ad222907f 100755
--- a/check.py
+++ b/check.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-import os, sys, subprocess, difflib
+import os, sys, subprocess, difflib, json
interpreter = None
tests = []
@@ -73,8 +73,12 @@ for c in tests:
except:
post = None
expected = open(os.path.join('test', c.replace('.c', '.txt'))).read()
+ emcc = os.path.join('test', c.replace('.c', '.emcc'))
+ extra = []
+ if os.path.exists(emcc):
+ extra = json.loads(open(emcc).read())
if os.path.exists('a.normal.js'): os.unlink('a.normal.js')
- subprocess.check_call(['./emcc_to_polyfill.sh', os.path.join('test', c)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ subprocess.check_call(['./emcc_to_polyfill.sh', os.path.join('test', c)] + extra)
if post:
open('a.normal.js', 'a').write(post)
open('a.wasm.js', 'a').write(post)