Skip to content

Commit 1d343fb

Browse files
committed
tests: add variant of sdl2_gl_read w/ proxy to pthread
1 parent 1ce461d commit 1d343fb

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

tests/test_browser.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3123,13 +3123,21 @@ def test_sdl2_timer(self):
31233123
def test_sdl2_canvas_size(self):
31243124
self.btest('sdl2_canvas_size.c', expected='1', args=['-s', 'USE_SDL=2'])
31253125

3126-
@requires_graphics_hardware
3127-
def test_sdl2_gl_read(self):
3126+
def _test_sdl2_gl_read_base(self, *args):
31283127
# SDL, OpenGL, readPixels
31293128
create_test_file('sdl2_gl_read.c', self.with_report_result(open(path_from_root('tests', 'sdl2_gl_read.c')).read()))
3130-
self.compile_btest(['sdl2_gl_read.c', '-o', 'something.html', '-s', 'USE_SDL=2'])
3129+
self.compile_btest(['sdl2_gl_read.c', '-o', 'something.html', '-s', 'USE_SDL=2'] + list(args))
31313130
self.run_browser('something.html', '.', '/report_result?1')
31323131

3132+
@requires_graphics_hardware
3133+
def test_sdl2_gl_read(self):
3134+
self._test_sdl2_gl_read_base()
3135+
3136+
@requires_threads
3137+
@requires_graphics_hardware
3138+
def test_sdl2_gl_read_with_proxy_to_pthread(self):
3139+
self._test_sdl2_gl_read_base('-s', 'USE_PTHREADS=1', '-s', 'PROXY_TO_PTHREAD=1', '-s', 'OFFSCREEN_FRAMEBUFFER=1')
3140+
31333141
@requires_graphics_hardware
31343142
def test_sdl2_fog_simple(self):
31353143
shutil.copyfile(path_from_root('tests', 'screenshot.png'), 'screenshot.png')

0 commit comments

Comments
 (0)