@@ -766,9 +766,11 @@ def test():
766
766
def test_dev_random (self ):
767
767
self .btest_exit (Path ('filesystem/dev_random.cpp' ))
768
768
769
+ @also_with_wasm64
769
770
def test_sdl_swsurface (self ):
770
771
self .btest_exit ('test_sdl_swsurface.c' , args = ['-lSDL' , '-lGL' ])
771
772
773
+ @also_with_wasm64
772
774
def test_sdl_surface_lock_opts (self ):
773
775
# Test Emscripten-specific extensions to optimize SDL_LockSurface and SDL_UnlockSurface.
774
776
self .btest ('hello_world_sdl.cpp' , reference = 'htmltest.png' , args = ['-DTEST_SDL_LOCK_OPTS' , '-lSDL' , '-lGL' ])
@@ -854,6 +856,7 @@ def test_sdl_stb_image_cleanup(self):
854
856
shutil .copyfile (test_file ('screenshot.jpg' ), 'screenshot.not' )
855
857
self .btest_exit ('test_sdl_stb_image_cleanup.c' , args = ['-sSTB_IMAGE' , '--preload-file' , 'screenshot.not' , '-lSDL' , '-lGL' , '--memoryprofiler' ])
856
858
859
+ @also_with_wasm64
857
860
def test_sdl_canvas (self ):
858
861
self .btest_exit ('test_sdl_canvas.c' , args = ['-sLEGACY_GL_EMULATION' , '-lSDL' , '-lGL' ])
859
862
# some extra coverage
@@ -882,6 +885,7 @@ def post_manual_reftest(self):
882
885
</body>''' % read_file ('reftest.js' ))
883
886
create_file ('test.html' , html )
884
887
888
+ @also_with_wasm64
885
889
def test_sdl_canvas_proxy (self ):
886
890
create_file ('data.txt' , 'datum' )
887
891
self .btest ('test_sdl_canvas_proxy.c' , reference = 'browser/test_sdl_canvas_proxy.png' , args = ['--proxy-to-worker' , '--preload-file' , 'data.txt' , '-lSDL' , '-lGL' ], manual_reference = True , post_build = self .post_manual_reftest )
@@ -895,6 +899,7 @@ def test_glgears_proxy_jstarget(self):
895
899
self .post_manual_reftest ()
896
900
self .run_browser ('test.html' , '/report_result?0' )
897
901
902
+ @also_with_wasm64
898
903
def test_sdl_canvas_alpha (self ):
899
904
# N.B. On Linux with Intel integrated graphics cards, this test needs Firefox 49 or newer.
900
905
# See https://github.com/emscripten-core/emscripten/issues/4069.
@@ -937,6 +942,7 @@ def test_sdl_key(self, delay):
937
942
''' % ('setTimeout(function() {' if delay else '' , '}, 1);' if delay else '' , 'setTimeout(function() {' if delay else '' , '}, 1);' if delay else '' ))
938
943
self .btest_exit ('test_sdl_key.c' , 223092870 , args = defines + async_ + ['--pre-js=pre.js' , '-lSDL' , '-lGL' ])
939
944
945
+ @also_with_wasm64
940
946
def test_sdl_key_proxy (self ):
941
947
create_file ('pre.js' , '''
942
948
Module.postRun = () => {
@@ -976,9 +982,11 @@ def post():
976
982
977
983
self .btest_exit ('test_sdl_key_proxy.c' , 223092870 , args = ['--proxy-to-worker' , '--pre-js' , 'pre.js' , '-sEXPORTED_FUNCTIONS=_main,_one' , '-lSDL' , '-lGL' ], post_build = post )
978
984
985
+ @also_with_wasm64
979
986
def test_canvas_focus (self ):
980
987
self .btest_exit ('canvas_focus.c' )
981
988
989
+ @also_with_wasm64
982
990
def test_keydown_preventdefault_proxy (self ):
983
991
def post ():
984
992
html = read_file ('test.html' )
@@ -1026,6 +1034,7 @@ def post():
1026
1034
1027
1035
self .btest ('keydown_preventdefault_proxy.cpp' , '300' , args = ['--proxy-to-worker' , '-sEXPORTED_FUNCTIONS=_main' ], post_build = post )
1028
1036
1037
+ @also_with_wasm64
1029
1038
def test_sdl_text (self ):
1030
1039
create_file ('pre.js' , '''
1031
1040
Module.postRun = () => {
@@ -1044,6 +1053,7 @@ def test_sdl_text(self):
1044
1053
1045
1054
self .btest_exit ('test_sdl_text.c' , args = ['--pre-js' , 'pre.js' , '-lSDL' , '-lGL' ])
1046
1055
1056
+ @also_with_wasm64
1047
1057
def test_sdl_mouse (self ):
1048
1058
create_file ('pre.js' , '''
1049
1059
function simulateMouseEvent(x, y, button) {
@@ -1075,6 +1085,7 @@ def test_sdl_mouse(self):
1075
1085
1076
1086
self .btest_exit ('test_sdl_mouse.c' , args = ['-O2' , '--minify=0' , '--pre-js' , 'pre.js' , '-lSDL' , '-lGL' ])
1077
1087
1088
+ @also_with_wasm64
1078
1089
def test_sdl_mouse_offsets (self ):
1079
1090
create_file ('pre.js' , '''
1080
1091
function simulateMouseEvent(x, y, button) {
@@ -1169,6 +1180,7 @@ def test_glut_glutget(self):
1169
1180
self .btest_exit ('glut_glutget.c' , args = ['-lglut' , '-lGL' ])
1170
1181
self .btest_exit ('glut_glutget.c' , args = ['-lglut' , '-lGL' , '-DAA_ACTIVATED' , '-DDEPTH_ACTIVATED' , '-DSTENCIL_ACTIVATED' , '-DALPHA_ACTIVATED' ])
1171
1182
1183
+ @also_with_wasm64
1172
1184
def test_sdl_joystick_1 (self ):
1173
1185
# Generates events corresponding to the Working Draft of the HTML5 Gamepad API.
1174
1186
# http://www.w3.org/TR/2012/WD-gamepad-20120529/#gamepad-interface
@@ -1201,6 +1213,7 @@ def test_sdl_joystick_1(self):
1201
1213
1202
1214
self .btest_exit ('test_sdl_joystick.c' , args = ['-O2' , '--minify=0' , '-o' , 'page.html' , '--pre-js' , 'pre.js' , '-lSDL' , '-lGL' ])
1203
1215
1216
+ @also_with_wasm64
1204
1217
def test_sdl_joystick_2 (self ):
1205
1218
# Generates events corresponding to the Editor's Draft of the HTML5 Gamepad API.
1206
1219
# https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#idl-def-Gamepad
@@ -1533,6 +1546,7 @@ def test_idbstore_sync_worker(self):
1533
1546
def test_force_exit (self ):
1534
1547
self .btest_exit ('force_exit.c' , assert_returncode = 10 )
1535
1548
1549
+ @also_with_wasm64
1536
1550
def test_sdl_pumpevents (self ):
1537
1551
# key events should be detected using SDL_PumpEvents
1538
1552
create_file ('pre.js' , '''
@@ -1543,20 +1557,24 @@ def test_sdl_pumpevents(self):
1543
1557
''' )
1544
1558
self .btest_exit ('test_sdl_pumpevents.c' , assert_returncode = 7 , args = ['--pre-js' , 'pre.js' , '-lSDL' , '-lGL' ])
1545
1559
1560
+ @also_with_wasm64
1546
1561
def test_sdl_canvas_size (self ):
1547
1562
self .btest_exit ('test_sdl_canvas_size.c' ,
1548
1563
args = ['-O2' , '--minify=0' , '--shell-file' ,
1549
1564
test_file ('browser/test_sdl_canvas_size.html' ), '-lSDL' , '-lGL' ])
1550
1565
1566
+ @also_with_wasm64
1551
1567
@requires_graphics_hardware
1552
1568
def test_sdl_gl_read (self ):
1553
1569
# SDL, OpenGL, readPixels
1554
1570
self .btest_exit ('test_sdl_gl_read.c' , args = ['-lSDL' , '-lGL' ])
1555
1571
1572
+ @also_with_wasm64
1556
1573
@requires_graphics_hardware
1557
1574
def test_sdl_gl_mapbuffers (self ):
1558
1575
self .btest_exit ('test_sdl_gl_mapbuffers.c' , args = ['-sFULL_ES3' , '-lSDL' , '-lGL' ])
1559
1576
1577
+ @also_with_wasm64
1560
1578
@requires_graphics_hardware
1561
1579
def test_sdl_ogl (self ):
1562
1580
shutil .copyfile (test_file ('screenshot.png' ), 'screenshot.png' )
@@ -1569,49 +1587,57 @@ def test_sdl_ogl_regal(self):
1569
1587
self .btest ('test_sdl_ogl.c' , reference = 'screenshot-gray-purple.png' , reference_slack = 1 ,
1570
1588
args = ['-O2' , '--minify=0' , '--preload-file' , 'screenshot.png' , '-sUSE_REGAL' , '-DUSE_REGAL' , '--use-preload-plugins' , '-lSDL' , '-lGL' ])
1571
1589
1590
+ @also_with_wasm64
1572
1591
@requires_graphics_hardware
1573
1592
def test_sdl_ogl_defaultmatrixmode (self ):
1574
1593
shutil .copyfile (test_file ('screenshot.png' ), 'screenshot.png' )
1575
1594
self .btest ('test_sdl_ogl_defaultMatrixMode.c' , reference = 'screenshot-gray-purple.png' , reference_slack = 1 ,
1576
1595
args = ['--minify=0' , '--preload-file' , 'screenshot.png' , '-sLEGACY_GL_EMULATION' , '--use-preload-plugins' , '-lSDL' , '-lGL' ])
1577
1596
1597
+ @also_with_wasm64
1578
1598
@requires_graphics_hardware
1579
1599
def test_sdl_ogl_p (self ):
1580
1600
# Immediate mode with pointers
1581
1601
shutil .copyfile (test_file ('screenshot.png' ), 'screenshot.png' )
1582
1602
self .btest ('test_sdl_ogl_p.c' , reference = 'screenshot-gray.png' , reference_slack = 1 ,
1583
1603
args = ['--preload-file' , 'screenshot.png' , '-sLEGACY_GL_EMULATION' , '--use-preload-plugins' , '-lSDL' , '-lGL' ])
1584
1604
1605
+ @also_with_wasm64
1585
1606
@requires_graphics_hardware
1586
1607
def test_sdl_ogl_proc_alias (self ):
1587
1608
shutil .copyfile (test_file ('screenshot.png' ), 'screenshot.png' )
1588
1609
self .btest ('test_sdl_ogl_proc_alias.c' , reference = 'screenshot-gray-purple.png' , reference_slack = 1 ,
1589
1610
args = ['-O2' , '-g2' , '-sINLINING_LIMIT' , '--preload-file' , 'screenshot.png' , '-sLEGACY_GL_EMULATION' , '--use-preload-plugins' , '-lSDL' , '-lGL' ])
1590
1611
1612
+ @also_with_wasm64
1591
1613
@requires_graphics_hardware
1592
1614
def test_sdl_fog_simple (self ):
1593
1615
shutil .copyfile (test_file ('screenshot.png' ), 'screenshot.png' )
1594
1616
self .btest ('test_sdl_fog_simple.c' , reference = 'screenshot-fog-simple.png' ,
1595
1617
args = ['-O2' , '--minify=0' , '--preload-file' , 'screenshot.png' , '-sLEGACY_GL_EMULATION' , '--use-preload-plugins' , '-lSDL' , '-lGL' ])
1596
1618
1619
+ @also_with_wasm64
1597
1620
@requires_graphics_hardware
1598
1621
def test_sdl_fog_negative (self ):
1599
1622
shutil .copyfile (test_file ('screenshot.png' ), 'screenshot.png' )
1600
1623
self .btest ('test_sdl_fog_negative.c' , reference = 'screenshot-fog-negative.png' ,
1601
1624
args = ['--preload-file' , 'screenshot.png' , '-sLEGACY_GL_EMULATION' , '--use-preload-plugins' , '-lSDL' , '-lGL' ])
1602
1625
1626
+ @also_with_wasm64
1603
1627
@requires_graphics_hardware
1604
1628
def test_sdl_fog_density (self ):
1605
1629
shutil .copyfile (test_file ('screenshot.png' ), 'screenshot.png' )
1606
1630
self .btest ('test_sdl_fog_density.c' , reference = 'screenshot-fog-density.png' ,
1607
1631
args = ['--preload-file' , 'screenshot.png' , '-sLEGACY_GL_EMULATION' , '--use-preload-plugins' , '-lSDL' , '-lGL' ])
1608
1632
1633
+ @also_with_wasm64
1609
1634
@requires_graphics_hardware
1610
1635
def test_sdl_fog_exp2 (self ):
1611
1636
shutil .copyfile (test_file ('screenshot.png' ), 'screenshot.png' )
1612
1637
self .btest ('test_sdl_fog_exp2.c' , reference = 'screenshot-fog-exp2.png' ,
1613
1638
args = ['--preload-file' , 'screenshot.png' , '-sLEGACY_GL_EMULATION' , '--use-preload-plugins' , '-lSDL' , '-lGL' ])
1614
1639
1640
+ @also_with_wasm64
1615
1641
@requires_graphics_hardware
1616
1642
def test_sdl_fog_linear (self ):
1617
1643
shutil .copyfile (test_file ('screenshot.png' ), 'screenshot.png' )
@@ -1637,6 +1663,7 @@ def test_glfw_time(self):
1637
1663
def _test_egl_base (self , * args ):
1638
1664
self .btest_exit ('test_egl.c' , args = ['-O2' , '-lEGL' , '-lGL' ] + list (args ))
1639
1665
1666
+ @also_with_wasm64
1640
1667
@requires_graphics_hardware
1641
1668
def test_egl (self ):
1642
1669
self ._test_egl_base ()
@@ -1649,13 +1676,16 @@ def test_egl_with_proxy_to_pthread(self):
1649
1676
def _test_egl_width_height_base (self , * args ):
1650
1677
self .btest_exit ('test_egl_width_height.c' , args = ['-O2' , '-lEGL' , '-lGL' ] + list (args ))
1651
1678
1679
+ @also_with_wasm64
1652
1680
def test_egl_width_height (self ):
1653
1681
self ._test_egl_width_height_base ()
1654
1682
1683
+ # @also_with_wasm64 FIXME: LinkError: WebAssembly.instantiate(): cannot import memory32 as memory64
1655
1684
@requires_threads
1656
1685
def test_egl_width_height_with_proxy_to_pthread (self ):
1657
1686
self ._test_egl_width_height_base ('-pthread' , '-sPROXY_TO_PTHREAD' )
1658
1687
1688
+ @also_with_wasm64
1659
1689
@requires_graphics_hardware
1660
1690
def test_egl_createcontext_error (self ):
1661
1691
self .btest_exit ('test_egl_createcontext_error.c' , args = ['-lEGL' , '-lGL' ])
@@ -1779,6 +1809,7 @@ def test_chunked_synchronous_xhr(self):
1779
1809
if WINDOWS :
1780
1810
time .sleep (2 )
1781
1811
1812
+ @also_with_wasm64
1782
1813
@requires_graphics_hardware
1783
1814
def test_glgears (self , extra_args = []): # noqa
1784
1815
self .btest ('hello_world_gles.c' , reference = 'gears.png' , reference_slack = 3 ,
@@ -1801,6 +1832,7 @@ def test_glgears_long(self, args):
1801
1832
args += ['-DHAVE_BUILTIN_SINCOS' , '-DLONGTEST' , '-lGL' , '-lglut' , '-DANIMATE' ]
1802
1833
self .btest ('hello_world_gles.c' , expected = '0' , args = args )
1803
1834
1835
+ @also_with_wasm64
1804
1836
@requires_graphics_hardware
1805
1837
def test_glgears_animation (self ):
1806
1838
for filename in ['hello_world_gles.c' , 'hello_world_gles_full.c' , 'hello_world_gles_full_944.c' ]:
@@ -1817,6 +1849,7 @@ def test_glgears_animation(self):
1817
1849
def test_fulles2_sdlproc (self ):
1818
1850
self .btest_exit ('full_es2_sdlproc.c' , assert_returncode = 1 , args = ['-sGL_TESTING' , '-DHAVE_BUILTIN_SINCOS' , '-sFULL_ES2' , '-lGL' , '-lSDL' , '-lglut' ])
1819
1851
1852
+ @also_with_wasm64
1820
1853
@requires_graphics_hardware
1821
1854
def test_glgears_deriv (self ):
1822
1855
self .btest ('hello_world_gles_deriv.c' , reference = 'gears.png' , reference_slack = 2 ,
0 commit comments