summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-04-13 10:17:53 -0700
committerGitHub <noreply@github.com>2020-04-13 10:17:53 -0700
commit13efc1eca8eebd93aae5ea0e96ef84282f56c822 (patch)
tree56feeb6ab080f99df13ec4af64e28cb0785e91d2
parentd7d251b75c46a814b764ff2ded0d9c5a275a7e46 (diff)
downloadbinaryen-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-xcheck.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/check.py b/check.py
index 0629d29d8..6211468c9 100755
--- a/check.py
+++ b/check.py
@@ -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():