23
23
24
24
from common import BrowserCore , RunnerCore , path_from_root , has_browser , EMTEST_BROWSER , Reporting
25
25
from common import create_file , parameterized , ensure_dir , disabled , test_file , WEBIDL_BINDER
26
- from common import read_file , requires_v8 , also_with_minimal_runtime , EMRUN , no_wasm64
26
+ from common import read_file , also_with_minimal_runtime , EMRUN , no_wasm64
27
27
from tools import shared
28
28
from tools import ports
29
29
from tools import utils
@@ -234,10 +234,6 @@ def setUp(self):
234
234
'-Wno-int-conversion' ,
235
235
]
236
236
237
- def require_wasm64 (self ):
238
- # All the browsers we run on support wasm64 (Chrome and Firefox).
239
- return True
240
-
241
237
def require_wasm2js (self ):
242
238
if self .is_wasm64 ():
243
239
self .skipTest ('wasm2js is not compatible with MEMORY64' )
@@ -1691,9 +1687,7 @@ def test_worker(self):
1691
1687
self .run_browser ('main.html' , '/report_result?hello from worker, and :' + ('data for w' if file_data else '' ) + ':' )
1692
1688
1693
1689
# code should run standalone too
1694
- # (doesn't work under browser64 due to `require_wasm64` hack in this class)
1695
- if not self .is_wasm64 ():
1696
- self .assertContained ('you should not see this text when in a worker!' , self .run_js ('worker.js' ))
1690
+ self .assertContained ('you should not see this text when in a worker!' , self .run_js ('worker.js' ))
1697
1691
1698
1692
@no_wasmfs ('https://github.com/emscripten-core/emscripten/issues/19608' )
1699
1693
def test_mmap_lazyfile (self ):
@@ -5561,8 +5555,7 @@ def test_wasm_worker_proxied_function(self):
5561
5555
self .btest ('wasm_worker/proxied_function.c' , expected = '0' , args = ['--js-library' , test_file ('wasm_worker/proxied_function.js' ), '-sWASM_WORKERS' , '-sASSERTIONS=0' ])
5562
5556
5563
5557
@no_firefox ('no 4GB support yet' )
5564
- @requires_v8
5565
- def test_zzz_zzz_4gb (self ):
5558
+ def test_4gb (self ):
5566
5559
# TODO Convert to an actual browser test when it reaches stable.
5567
5560
# For now, keep this in browser as this suite runs serially, which
5568
5561
# means we don't compete for memory with anything else (and run it
@@ -5572,11 +5565,11 @@ def test_zzz_zzz_4gb(self):
5572
5565
# test that we can allocate in the 2-4GB range, if we enable growth and
5573
5566
# set the max appropriately
5574
5567
self .emcc_args += ['-O2' , '-sALLOW_MEMORY_GROWTH' , '-sMAXIMUM_MEMORY=4GB' ]
5575
- self .do_run_in_out_file_test ('browser' , ' test_4GB.cpp' )
5568
+ self .do_run_in_out_file_test ('browser/ test_4GB.cpp' )
5576
5569
5577
5570
# Tests that emmalloc supports up to 4GB Wasm heaps.
5578
5571
@no_firefox ('no 4GB support yet' )
5579
- def test_zzz_zzz_emmalloc_4gb (self ):
5572
+ def test_emmalloc_4gb (self ):
5580
5573
# For now, keep this in browser as this suite runs serially, which
5581
5574
# means we don't compete for memory with anything else (and run it
5582
5575
# at the very very end, to reduce the risk of it OOM-killing the
@@ -5653,12 +5646,11 @@ def test_wasmfs_opfs_errors(self):
5653
5646
self .btest (test , args = args , expected = "0" )
5654
5647
5655
5648
@no_firefox ('no 4GB support yet' )
5656
- def test_zzz_zzz_emmalloc_memgrowth (self , * args ):
5649
+ def test_emmalloc_memgrowth (self , * args ):
5657
5650
self .btest ('emmalloc_memgrowth.cpp' , expected = '0' , args = ['-sMALLOC=emmalloc' , '-sALLOW_MEMORY_GROWTH=1' , '-sABORTING_MALLOC=0' , '-sASSERTIONS=2' , '-sMINIMAL_RUNTIME=1' , '-sMAXIMUM_MEMORY=4GB' ])
5658
5651
5659
5652
@no_firefox ('no 4GB support yet' )
5660
- @requires_v8
5661
- def test_zzz_zzz_2gb_fail (self ):
5653
+ def test_2gb_fail (self ):
5662
5654
# TODO Convert to an actual browser test when it reaches stable.
5663
5655
# For now, keep this in browser as this suite runs serially, which
5664
5656
# means we don't compete for memory with anything else (and run it
@@ -5668,12 +5660,10 @@ def test_zzz_zzz_2gb_fail(self):
5668
5660
# test that growth doesn't go beyond 2GB without the max being set for that,
5669
5661
# and that we can catch an allocation failure exception for that
5670
5662
self .emcc_args += ['-O2' , '-sALLOW_MEMORY_GROWTH' , '-sMAXIMUM_MEMORY=2GB' ]
5671
- self .do_run_in_out_file_test ('browser' , ' test_2GB_fail.cpp' )
5663
+ self .do_run_in_out_file_test ('browser/ test_2GB_fail.cpp' )
5672
5664
5673
5665
@no_firefox ('no 4GB support yet' )
5674
- @requires_v8
5675
- @no_wasm64 ()
5676
- def test_zzz_zzz_4gb_fail (self ):
5666
+ def test_4gb_fail (self ):
5677
5667
# TODO Convert to an actual browser test when it reaches stable.
5678
5668
# For now, keep this in browser as this suite runs serially, which
5679
5669
# means we don't compete for memory with anything else (and run it
@@ -5682,12 +5672,9 @@ def test_zzz_zzz_4gb_fail(self):
5682
5672
5683
5673
# test that we properly report an allocation error that would overflow over
5684
5674
# 4GB.
5685
- if self .get_setting ('MEMORY64' ):
5686
- self .set_setting ('MAXIMUM_MEMORY' , '6GB' )
5687
- else :
5688
- self .set_setting ('MAXIMUM_MEMORY' , '4GB' )
5675
+ self .set_setting ('MAXIMUM_MEMORY' , '4GB' )
5689
5676
self .emcc_args += ['-O2' , '-sALLOW_MEMORY_GROWTH' , '-sABORTING_MALLOC=0' , '-sASSERTIONS' ]
5690
- self .do_run_in_out_file_test ('browser' , ' test_4GB_fail.cpp' )
5677
+ self .do_run_in_out_file_test ('browser/ test_4GB_fail.cpp' )
5691
5678
5692
5679
# Tests that Emscripten-compiled applications can be run when a slash in the URL query or fragment of the js file
5693
5680
def test_browser_run_with_slash_in_query_and_hash (self ):
0 commit comments