summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-01 11:34:16 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-01 11:34:16 -0800
commitb0f8bb17b8695698541f241a37e9b43cdd441206 (patch)
treeeef7ff3c19c342a3d61298caa4ba7e9e689ec598 /check.py
parentbbd8b2eb841b71c4801e2d0a942550709bb22574 (diff)
downloadbinaryen-b0f8bb17b8695698541f241a37e9b43cdd441206.tar.gz
binaryen-b0f8bb17b8695698541f241a37e9b43cdd441206.tar.bz2
binaryen-b0f8bb17b8695698541f241a37e9b43cdd441206.zip
support .cpp files in check
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/check.py b/check.py
index 2d7c8a8d6..4fbe154d7 100755
--- a/check.py
+++ b/check.py
@@ -65,15 +65,16 @@ for asm in tests:
print '\n[ checking wasm.js polyfill testcases... (need both emcc and nodejs in your path) ]\n'
for c in tests:
- if c.endswith('.c'):
+ if c.endswith(('.c', '.cpp')):
print '..', c
- post = c.replace('.c', '.post.js')
+ base = c.replace('.cpp', '').replace('.c', '')
+ post = base + '.post.js'
try:
post = open(os.path.join('test', post)).read()
except:
post = None
- expected = open(os.path.join('test', c.replace('.c', '.txt'))).read()
- emcc = os.path.join('test', c.replace('.c', '.emcc'))
+ expected = open(os.path.join('test', base + '.txt')).read()
+ emcc = os.path.join('test', base + '.emcc')
extra = []
if os.path.exists(emcc):
extra = json.loads(open(emcc).read())