Skip to content

Commit

Permalink
Remove redundant code in test_sdl2_gl_frames_swap. NFC
Browse files Browse the repository at this point in the history
The post_build function here exists solely in order to patch out
(remove) the auto running on doRefTest.  However the test is already
built with `manual_reference=True` which already does this.
  • Loading branch information
sbc100 committed Sep 19, 2024
1 parent 6cfab10 commit 644f27c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3063,13 +3063,7 @@ def test_sdl2_canvas_write(self):

@requires_graphics_hardware
def test_sdl2_gl_frames_swap(self):
def post_build():
self.post_manual_reftest()
reftest = read_file('reftest.js')
reftest2 = reftest.replace("Module['postRun'] = doReftest;", '') # we don't want the very first frame
assert reftest != reftest2
create_file('reftest.js', reftest2)
self.reftest('test_sdl2_gl_frames_swap.c', 'test_sdl2_gl_frames_swap.png', args=['--proxy-to-worker', '-sGL_TESTING', '-sUSE_SDL=2'], manual_reference=True, post_build=post_build)
self.reftest('test_sdl2_gl_frames_swap.c', 'test_sdl2_gl_frames_swap.png', args=['--proxy-to-worker', '-sGL_TESTING', '-sUSE_SDL=2'], manual_reference=True, post_build=self.post_manual_reftest)

@requires_graphics_hardware
def test_sdl2_ttf(self):
Expand Down

0 comments on commit 644f27c

Please sign in to comment.