Skip to content

Commit 5867d8d

Browse files
committed
update other.test_no_nuthin, we don't care about code size with assertions. also split it up for convenience
1 parent 68919f2 commit 5867d8d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_other.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4828,7 +4828,7 @@ def test_no_filesystem(self):
48284828
assert no_size < 360000
48294829

48304830
def test_no_nuthin(self):
4831-
print('part one: check NO_FILESYSTEM is automatically set, and effective')
4831+
# check NO_FILESYSTEM is automatically set, and effective
48324832
def test(opts, ratio, absolute):
48334833
print('opts, ratio, absolute:', opts, ratio, absolute)
48344834
def get_size(name):
@@ -4851,13 +4851,14 @@ def do(name, source, moar_opts):
48514851
if '--closure' in opts: # no EXPORTED_RUNTIME_METHODS makes closure much more effective
48524852
assert sizes['no_nuthin'] < 0.975*sizes['no_fs']
48534853
assert sizes['no_fs_manual'] < sizes['no_fs'] # manual can remove a tiny bit more
4854-
test([], 0.75, 360000)
4854+
test(['-s', 'ASSERTIONS=0'], 0.75, 360000) # we don't care about code size with assertions
48554855
test(['-O1'], 0.66, 210000)
48564856
test(['-O2'], 0.50, 70000)
48574857
test(['-O3', '--closure', '1'], 0.60, 50000)
48584858
test(['-O3', '--closure', '2'], 0.60, 41000) # might change now and then
48594859

4860-
print('part two: focus on EXPORTED_RUNTIME_METHODS effects, on hello_world_em_asm')
4860+
def test_no_nuthin_2(self):
4861+
# focus on EXPORTED_RUNTIME_METHODS effects, on hello_world_em_asm
48614862
def test(opts, ratio, absolute):
48624863
print('opts, ratio, absolute:', opts, ratio, absolute)
48634864
def get_size(name):
@@ -4876,7 +4877,7 @@ def do(name, moar_opts):
48764877
assert sizes['no_nuthin'] < absolute
48774878
if '--closure' in opts: # no EXPORTED_RUNTIME_METHODS makes closure much more effective
48784879
assert sizes['no_nuthin'] < 0.975*sizes['normal']
4879-
test([], 1, 220000)
4880+
test(['-s', 'ASSERTIONS=0'], 1, 220000) # we don't care about code size with assertions
48804881
test(['-O1'], 1, 215000)
48814882
test(['-O2'], 0.99, 75000)
48824883
test(['-O3', '--closure', '1'], 0.975, 50000)

0 commit comments

Comments
 (0)