diff options
author | Alon Zakai <azakai@google.com> | 2020-04-13 10:17:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-13 10:17:53 -0700 |
commit | 13efc1eca8eebd93aae5ea0e96ef84282f56c822 (patch) | |
tree | 56feeb6ab080f99df13ec4af64e28cb0785e91d2 | |
parent | d7d251b75c46a814b764ff2ded0d9c5a275a7e46 (diff) | |
download | binaryen-13efc1eca8eebd93aae5ea0e96ef84282f56c822.tar.gz binaryen-13efc1eca8eebd93aae5ea0e96ef84282f56c822.tar.bz2 binaryen-13efc1eca8eebd93aae5ea0e96ef84282f56c822.zip |
Speed up wasm-reduce test (#2756)
The test there just wants to see that the reducer can remove
a significant amount of code. I changed it from a file of 3.6K
to 200 bytes, which is enough to see the effect, and much faster.
-rwxr-xr-x | check.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -180,13 +180,13 @@ def run_wasm_reduce_tests(): if 'fsanitize=thread' not in str(os.environ): print('\n[ checking wasm-reduce fuzz testcase ]\n') - support.run_command(shared.WASM_OPT + [os.path.join(shared.options.binaryen_test, 'unreachable-import_wasm-only.asm.js'), '-ttf', '-Os', '-o', 'a.wasm', '-all']) + support.run_command(shared.WASM_OPT + [os.path.join(shared.options.binaryen_test, 'untaken-br_if.wast'), '-ttf', '-Os', '-o', 'a.wasm', '-all']) before = os.stat('a.wasm').st_size support.run_command(shared.WASM_REDUCE + ['a.wasm', '--command=%s b.wasm --fuzz-exec -all' % shared.WASM_OPT[0], '-t', 'b.wasm', '-w', 'c.wasm']) after = os.stat('c.wasm').st_size # This number is a custom threshold to check if we have shrunk the # output sufficiently - assert after < 0.75 * before, [before, after] + assert after < 0.85 * before, [before, after] def run_spec_tests(): |