Skip to content

Commit 882bc6a

Browse files
authored
Fix test_sdl3_ttf. NFC (#26446)
Also, make the SDL3 warning show up every time its used, not just when its built. This is why this error didn't show up in our CI, because if another SDL3 test ran first it would suppress this warning.
1 parent df2e576 commit 882bc6a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

test/test_browser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2164,7 +2164,7 @@ def test_sdl3_ttf_render_text_solid(self):
21642164
shutil.copy2(test_file('freetype/LiberationSansBold.ttf'), self.get_dir())
21652165
self.reftest('test_sdl3_ttf_render_text_solid.c', 'test_sdl3_ttf_render_text_solid.png',
21662166
cflags=[
2167-
'-O2', '-sUSE_SDL=3', '-sUSE_SDL_TTF=3', '-lGL',
2167+
'-O2', '-sUSE_SDL=3', '-sUSE_SDL_TTF=3', '-lGL', '-Wno-experimental',
21682168
'--embed-file', 'LiberationSansBold.ttf'])
21692169

21702170
def test_sdl_alloctext(self):

test/test_other.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2694,8 +2694,8 @@ def test_sdl2_ttf(self):
26942694
@requires_network
26952695
def test_sdl3_ttf(self):
26962696
# A compile-only test that checks if sdl3-ttf, and dependencies freetype and harfbuzz, are buildable.
2697-
self.emcc(test_file('browser/test_sdl3_ttf.c'), args=['-sUSE_SDL=3', '-sUSE_SDL_TTF=3'])
2698-
self.emcc(test_file('browser/test_sdl3_ttf.c'), args=['--use-port=sdl3', '--use-port=sdl3_ttf'])
2697+
self.emcc(test_file('browser/test_sdl3_ttf.c'), args=['-Wno-experimental', '-sUSE_SDL=3', '-sUSE_SDL_TTF=3'])
2698+
self.emcc(test_file('browser/test_sdl3_ttf.c'), args=['-Wno-experimental', '--use-port=sdl3', '--use-port=sdl3_ttf'])
26992699

27002700
@requires_network
27012701
def test_contrib_ports(self):

tools/ports/sdl3.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ def get_lib_name(settings):
2626

2727

2828
def get(ports, settings, shared):
29+
diagnostics.warning('experimental', 'sdl3 port is still experimental')
30+
2931
# get the port
3032
ports.fetch_project('sdl3', f'https://github.com/libsdl-org/SDL/archive/{TAG}.zip', sha512hash=HASH)
3133

3234
def create(final):
33-
diagnostics.warning('experimental', 'sdl3 port is still experimental')
3435
root_dir = ports.get_dir('sdl3', SUBDIR)
3536

3637
# In addition copy our pre-generated SDL_build_config.h file.

0 commit comments

Comments
 (0)