Skip to content

Commit d32796b

Browse files
committed
Remove @no_wasm_backend test decorator. NFC
Fixes: #12335
1 parent 8125b84 commit d32796b

File tree

5 files changed

+18
-21
lines changed

5 files changed

+18
-21
lines changed

.circleci/config.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ commands:
205205
# browser.test_webgl_offscreen_canvas_in_mainthread_after_pthread
206206
# are crashing Firefox (bugzil.la/1281796). The former case is
207207
# further blocked by issue #6897.
208-
# browser.test_sdl2_misc_main_module: Requires PIC version of libSDL
209-
# which is not included in emsdk (not compatible with FROZEN_CACHE).
210208
name: run tests
211209
environment:
212210
GALLIUM_DRIVER: softpipe # TODO: use the default llvmpipe when it supports more extensions
@@ -218,12 +216,16 @@ commands:
218216
EMTEST_LACKS_OFFSCREEN_CANVAS: "1"
219217
EMTEST_DETECT_TEMPFILE_LEAKS: "0"
220218
DISPLAY: ":0"
219+
# There are a tests in the browser test suite that using library
220+
# that are not included by "./embuilder build ALL". For example the
221+
# PIC version of libSDL which is used by test_sdl2_misc_main_module
222+
EM_FROZEN_CACHE: ""
221223
command: |
222224
export EMTEST_BROWSER="$HOME/firefox/firefox -headless -profile $HOME/tmp-firefox-profile/"
223225
echo "-----"
224226
echo "Running browser tests"
225227
echo "-----"
226-
tests/runner browser skip:browser.test_sdl2_mouse skip:browser.test_html5_webgl_create_context skip:browser.test_webgl_offscreen_canvas_in_pthread skip:browser.test_webgl_offscreen_canvas_in_mainthread_after_pthread skip:browser.test_glut_glutget skip:browser.test_sdl2_misc_main_module
228+
tests/runner browser skip:browser.test_sdl2_mouse skip:browser.test_html5_webgl_create_context skip:browser.test_webgl_offscreen_canvas_in_pthread skip:browser.test_webgl_offscreen_canvas_in_mainthread_after_pthread skip:browser.test_glut_glutget
227229
# posix and emrun suites are disabled because firefox errors on
228230
# "Firefox is already running, but is not responding."
229231
# TODO: find out a way to shut down and restart firefox
@@ -243,12 +245,14 @@ commands:
243245
CHROME_FLAGS_HEADLESS: "--headless --remote-debugging-port=1234"
244246
CHROME_FLAGS_WASM: "--enable-features=WebAssembly --enable-features=SharedArrayBuffer --disable-features=WebAssemblyTrapHandler --js-flags=\"--experimental-wasm-threads --harmony-sharedarraybuffer\""
245247
CHROME_FLAGS_NOCACHE: "--disk-cache-dir=/dev/null --disk-cache-size=1 --media-cache-size=1 --disable-application-cache --incognito"
248+
# There are a tests in the browser test suite that using library
249+
# that are not included by "./embuilder build ALL". For example the
250+
# PIC version of libSDL which is used by test_sdl2_misc_main_module
251+
EM_FROZEN_CACHE: ""
246252
command: |
247253
export EMTEST_BROWSER="/usr/bin/google-chrome $CHROME_FLAGS_BASE $CHROME_FLAGS_HEADLESS $CHROME_FLAGS_WASM $CHROME_FLAGS_NOCACHE"
248254
# skip test_zzz_zzz_4gb_fail as it OOMs on the current bot
249-
# browser.test_sdl2_misc_main_module: Requires PIC version of libSDL
250-
# which is not included in emsdk (not compatible with FROZEN_CACHE).
251-
tests/runner browser posixtest_browser.test_pthread_create_1_1 skip:browser.test_zzz_zzz_4gb_fail skip:browser.test_sdl2_misc_main_module
255+
tests/runner browser posixtest_browser.test_pthread_create_1_1 skip:browser.test_zzz_zzz_4gb_fail
252256
tests/runner emrun
253257
test-sockets-chrome:
254258
description: "Runs emscripten sockets tests under chrome"

embuilder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ def main():
195195
tasks = system_tasks + PORTS
196196
auto_tasks = True
197197
if auto_tasks:
198-
# cocos2d: must be ported, errors on
199-
# "Cannot recognize the target platform; are you targeting an unsupported platform?"
198+
# There are some ports that we don't want to build as part
199+
# of ALL since the are not well tested or widely used:
200200
skip_tasks = ['cocos2d']
201201
tasks = [x for x in tasks if x not in skip_tasks]
202202
print('Building targets: %s' % ' '.join(tasks))

src/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ var USE_HARFBUZZ = false;
14431443

14441444
// 3 = use cocos2d v3 from emscripten-ports
14451445
// [link]
1446-
var USE_COCOS2D = false;
1446+
var USE_COCOS2D = 0;
14471447

14481448
// 1 = use libmodplug from emscripten-ports
14491449
// [link]

tests/test_browser.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,6 @@ def decorated(self, *args, **kwargs):
161161
return decorated
162162

163163

164-
# Today we only support the wasm backend so any tests that is disabled under the llvm
165-
# backend is always disabled.
166-
# TODO(sbc): Investigate all tests with this decorator and either fix of remove the test.
167-
def no_wasm_backend(note=''):
168-
assert not callable(note)
169-
return unittest.skip(note)
170-
171-
172164
requires_graphics_hardware = unittest.skipIf(os.getenv('EMTEST_LACKS_GRAPHICS_HARDWARE'), "This test requires graphics hardware")
173165
requires_sound_hardware = unittest.skipIf(os.getenv('EMTEST_LACKS_SOUND_HARDWARE'), "This test requires sound hardware")
174166
requires_sync_compilation = unittest.skipIf(is_chrome(), "This test requires synchronous compilation, which does not work in Chrome (except for tiny wasms)")
@@ -3291,7 +3283,6 @@ def test_sdl2_mixer_music(self, formats, flags, music_name):
32913283
'-sINITIAL_MEMORY=33554432'
32923284
])
32933285

3294-
@no_wasm_backend('cocos2d needs to be ported')
32953286
@requires_graphics_hardware
32963287
def test_cocos2d_hello(self):
32973288
cocos2d_root = os.path.join(ports.Ports.get_build_dir(), 'cocos2d')
@@ -4646,19 +4637,19 @@ def test_fetch_sync_xhr_in_proxy_to_worker(self):
46464637
args=['-sFETCH_DEBUG', '-sFETCH', '--proxy-to-worker'])
46474638

46484639
# Tests waiting on EMSCRIPTEN_FETCH_WAITABLE request from a worker thread
4649-
@no_wasm_backend("emscripten_fetch_wait uses an asm.js based web worker")
4640+
@unittest.skip("emscripten_fetch_wait relies on an asm.js-based web worker")
46504641
@requires_threads
46514642
def test_fetch_sync_fetch_in_main_thread(self):
46524643
shutil.copyfile(test_file('gears.png'), 'gears.png')
46534644
self.btest_exit('fetch/sync_fetch_in_main_thread.cpp', args=['-sFETCH_DEBUG', '-sFETCH', '-sWASM=0', '-sUSE_PTHREADS', '-sPROXY_TO_PTHREAD'])
46544645

46554646
@requires_threads
4656-
@no_wasm_backend("WASM2JS does not yet support pthreads")
4647+
@disabled('https://github.com/emscripten-core/emscripten/issues/16746')
46574648
def test_fetch_idb_store(self):
46584649
self.btest_exit('fetch/idb_store.cpp', args=['-sUSE_PTHREADS', '-sFETCH', '-sWASM=0', '-sPROXY_TO_PTHREAD'])
46594650

46604651
@requires_threads
4661-
@no_wasm_backend("WASM2JS does not yet support pthreads")
4652+
@disabled('https://github.com/emscripten-core/emscripten/issues/16746')
46624653
def test_fetch_idb_delete(self):
46634654
shutil.copyfile(test_file('gears.png'), 'gears.png')
46644655
self.btest_exit('fetch/idb_delete.cpp', args=['-sUSE_PTHREADS', '-sFETCH_DEBUG', '-sFETCH', '-sWASM=0', '-sPROXY_TO_PTHREAD'])

tools/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ def parse_config_file():
137137
env_var = 'EM_' + key
138138
env_value = os.environ.get(env_var)
139139
if env_value is not None:
140+
if env_value == '':
141+
env_value = None
140142
globals()[key] = env_value
141143
elif key in config:
142144
globals()[key] = config[key]

0 commit comments

Comments
 (0)