From af0f6ef999e8ddf9c168b697710fd313883e8807 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 22 Feb 2016 15:11:09 -0800 Subject: Bug fix and adds printing / parsing tests. --- check.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'check.py') diff --git a/check.py b/check.py index 7b1ec6835..16a235ec6 100755 --- a/check.py +++ b/check.py @@ -279,6 +279,17 @@ for asm in tests: raise Exception('wasm interpreter error: ' + err) # failed to pretty-print raise Exception('wasm interpreter error') +print '\n[ checking binaryen-shell parsing & printing... ]\n' + +for t in sorted(os.listdir(os.path.join('test', 'print'))): + if t.endswith('.wast'): + print '..', t + name = os.path.basename(t).replace('.wast', '') + cmd = [os.path.join('bin', 'binaryen-shell'), os.path.join('test', 'print', t), '--print'] + print ' ', ' '.join(cmd) + actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + fail_if_not_identical(actual, open(os.path.join('test', 'print', name + '.txt')).read()) + print '\n[ checking binaryen-shell passes... ]\n' for t in sorted(os.listdir(os.path.join('test', 'passes'))): -- cgit v1.2.3