Skip to content

Commit

Permalink
Revert "other.test_minimal_runtime_code_size: apply slop to code sizes (
Browse files Browse the repository at this point in the history
emscripten-core#8364)"

This reverts commit 08105ed.
  • Loading branch information
VirtualTim authored May 23, 2019
1 parent 7d3fa48 commit 2a1261d
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -9088,15 +9088,10 @@ def print_percent(actual, expected):
size = os.path.getsize(f)
print('size of ' + f + ' == ' + str(size) + ', expected ' + str(expected_size) + ', delta=' + str(size - expected_size) + print_percent(size, expected_size))

# Hack: Generated .mem initializer files have different sizes on different
# platforms (Windows gives x, CircleCI Linux gives x-17 bytes, my home
# Linux gives x+2 bytes..). Likewise asm.js files seem to be affected by
# the LLVM IR text names, which lead to asm.js names, which leads to
# difference code size, which leads to different relooper choices,
# as a result leading to slightly different total code sizes.
# TODO: identify what is causing this. meanwhile allow some amount of slop
# Hack: Generated .mem initializer files have different sizes on different platforms (Windows gives x, CircleCI Linux gives x-17 bytes, my home Linux gives x+2 bytes..)
# TODO: identify what is causing this (until that, expected .mem initializer file sizes are conservative estimates that do not contribute to total size)
mem_slop = 20
if size <= expected_size + mem_slop and size >= expected_size - mem_slop:
if f.endswith('.mem') or f.endswith('.wasm') and size <= expected_size + mem_slop and size >= expected_size - mem_slop:
size = expected_size

total_output_size += size
Expand Down

0 comments on commit 2a1261d

Please sign in to comment.