diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-01 11:34:16 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-01 11:34:16 -0800 |
commit | b0f8bb17b8695698541f241a37e9b43cdd441206 (patch) | |
tree | eef7ff3c19c342a3d61298caa4ba7e9e689ec598 /check.py | |
parent | bbd8b2eb841b71c4801e2d0a942550709bb22574 (diff) | |
download | binaryen-b0f8bb17b8695698541f241a37e9b43cdd441206.tar.gz binaryen-b0f8bb17b8695698541f241a37e9b43cdd441206.tar.bz2 binaryen-b0f8bb17b8695698541f241a37e9b43cdd441206.zip |
support .cpp files in check
Diffstat (limited to 'check.py')
-rwxr-xr-x | check.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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()) |