diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-22 18:16:14 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-22 18:16:14 -0800 |
commit | 15595f1ea36fa4268e5db66b8717999f7f363621 (patch) | |
tree | 01999a765bac1ca67f9b29e0a9a894e337e8d768 | |
parent | 7537fe280b24dcbe7733685cc20e2abde259f082 (diff) |
csmith driver tweaking
-rwxr-xr-x | tests/csmith_driver.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/csmith_driver.py b/tests/csmith_driver.py index a244b73c..fcf937f6 100755 --- a/tests/csmith_driver.py +++ b/tests/csmith_driver.py @@ -24,7 +24,7 @@ while 1: print 'Tried %d, valid: %d' % (tried, valid) tried += 1 print '1) Generate C' - shared.execute([CSMITH, '--no-volatiles', '--no-math64', '--max-block-depth', '2', '--max-block-size', '2', '--max-expr-complexity', '2', '--max-funcs', '1'], stdout=open(filename + '.c', 'w')) + shared.execute([CSMITH, '--no-volatiles', '--no-math64', '--max-block-depth', '2', '--max-block-size', '2', '--max-expr-complexity', '2', '--max-funcs', '2'], stdout=open(filename + '.c', 'w')) print '2) Compile natively' shared.try_delete(filename) @@ -40,11 +40,11 @@ while 1: print '4) Compile JS-ly' shared.try_delete(filename + '.js') - shared.execute([shared.EMCC, '-O2', filename + '.c', '-o', filename + '.js'] + CSMITH_CFLAGS, stderr=PIPE) + shared.execute([shared.EMCC, '-O2', '-s', 'ASM_JS=1', '-s', 'PRECISE_I64_MATH=1', '-s', 'PRECISE_I32_MUL=1', filename + '.c', '-o', filename + '.js'] + CSMITH_CFLAGS, stderr=PIPE) assert os.path.exists(filename + '.js') print '5) Run JS-ly' js = shared.run_js(filename + '.js', stderr=PIPE) #, engine=...) print '6) Verify' - assert correct == js, ''.join([a.rstrip()+'\n' for a in difflib.unified_diff(x.split('\n'), y.split('\n'), fromfile='expected', tofile='actual')]) + assert correct == js, ''.join([a.rstrip()+'\n' for a in difflib.unified_diff(correct.split('\n'), js.split('\n'), fromfile='expected', tofile='actual')]) |