@@ -204,7 +204,7 @@ def setUpClass(cls):
204
204
print ()
205
205
206
206
def proxy_to_worker (self ):
207
- self .cflags += ['--proxy-to-worker' , '-sGL_TESTING' ]
207
+ self .cflags += ['--proxy-to-worker' , '-Wno-deprecated' , '- sGL_TESTING' ]
208
208
209
209
def require_jspi (self ):
210
210
if not is_chrome ():
@@ -890,13 +890,13 @@ def test_sdl_canvas(self, args):
890
890
@proxied
891
891
def test_sdl_canvas_proxy (self ):
892
892
create_file ('data.txt' , 'datum' )
893
- self .reftest ('test_sdl_canvas_proxy.c' , 'test_sdl_canvas_proxy.png' , cflags = ['--proxy-to-worker' , '--preload-file' , 'data.txt' , '-lSDL' , '-lGL' ])
893
+ self .reftest ('test_sdl_canvas_proxy.c' , 'test_sdl_canvas_proxy.png' , cflags = ['--proxy-to-worker' , '-Wno-deprecated' , '- -preload-file' , 'data.txt' , '-lSDL' , '-lGL' ])
894
894
895
895
@requires_graphics_hardware
896
896
@flaky ('https://github.com/emscripten-core/emscripten/issues/25329' )
897
897
def test_glgears_proxy_jstarget (self ):
898
898
# test .js target with --proxy-worker; emits 2 js files, client and worker
899
- self .compile_btest ('hello_world_gles_proxy.c' , ['-o' , 'test.js' , '--proxy-to-worker' , '-sGL_TESTING' , '-lGL' , '-lglut' ])
899
+ self .compile_btest ('hello_world_gles_proxy.c' , ['-o' , 'test.js' , '--proxy-to-worker' , '-Wno-deprecated' , '- sGL_TESTING' , '-lGL' , '-lglut' ])
900
900
shell_with_script ('shell_minimal.html' , 'test.html' , '<script src="test.js"></script>' )
901
901
self .make_reftest (test_file ('gears.png' ))
902
902
self .post_manual_reftest ()
@@ -972,7 +972,7 @@ def post():
972
972
</body>''' )
973
973
create_file ('test.html' , html )
974
974
975
- self .btest_exit ('test_sdl_key_proxy.c' , 223092870 , cflags = ['--proxy-to-worker' , '--pre-js' , 'pre.js' , '-lSDL' , '-lGL' , '-sRUNTIME_DEBUG' ], post_build = post )
975
+ self .btest_exit ('test_sdl_key_proxy.c' , 223092870 , cflags = ['--proxy-to-worker' , '-Wno-deprecated' , '- -pre-js' , 'pre.js' , '-lSDL' , '-lGL' , '-sRUNTIME_DEBUG' ], post_build = post )
976
976
977
977
def test_canvas_focus (self ):
978
978
self .btest_exit ('test_canvas_focus.c' , cflags = ['--pre-js' , test_file ('browser/fake_events.js' )])
@@ -999,7 +999,7 @@ def post():
999
999
create_file ('test.html' , html )
1000
1000
1001
1001
shutil .copy (test_file ('browser/fake_events.js' ), '.' )
1002
- self .btest_exit ('browser/test_keydown_preventdefault_proxy.c' , 300 , cflags = ['--proxy-to-worker' ], post_build = post )
1002
+ self .btest_exit ('browser/test_keydown_preventdefault_proxy.c' , 300 , cflags = ['--proxy-to-worker' , '-Wno-deprecated' ], post_build = post )
1003
1003
1004
1004
def test_sdl_text (self ):
1005
1005
create_file ('pre.js' , '''
@@ -1355,14 +1355,14 @@ def test_fs_workerfs_read(self):
1355
1355
}, '/work');
1356
1356
};
1357
1357
''' % (secret , secret2 ))
1358
- self .btest_exit ('fs/test_workerfs_read.c' , cflags = ['-lworkerfs.js' , '--pre-js' , 'pre.js' , f'-DSECRET="{ secret } "' , f'-DSECRET2="{ secret2 } "' , '--proxy-to-worker' , '-lworkerfs.js' ])
1358
+ self .btest_exit ('fs/test_workerfs_read.c' , cflags = ['-lworkerfs.js' , '--pre-js' , 'pre.js' , f'-DSECRET="{ secret } "' , f'-DSECRET2="{ secret2 } "' , '--proxy-to-worker' , '-Wno-deprecated' , '- lworkerfs.js' ])
1359
1359
1360
1360
def test_fs_workerfs_package (self ):
1361
1361
create_file ('file1.txt' , 'first' )
1362
1362
ensure_dir ('sub' )
1363
1363
create_file ('sub/file2.txt' , 'second' )
1364
1364
self .run_process ([FILE_PACKAGER , 'files.data' , '--preload' , 'file1.txt' , 'sub/file2.txt' , '--separate-metadata' , '--js-output=files.js' ])
1365
- self .btest ('fs/test_workerfs_package.c' , '1' , cflags = ['-lworkerfs.js' , '--proxy-to-worker' , '-lworkerfs.js' ])
1365
+ self .btest ('fs/test_workerfs_package.c' , '1' , cflags = ['-lworkerfs.js' , '--proxy-to-worker' , '-Wno-deprecated' , '- lworkerfs.js' ])
1366
1366
1367
1367
def test_fs_lz4fs_package (self ):
1368
1368
# generate data
@@ -1450,7 +1450,7 @@ def test_idbstore_sync(self, asyncify):
1450
1450
1451
1451
def test_idbstore_sync_worker (self ):
1452
1452
secret = str (time .time ())
1453
- self .btest ('test_idbstore_sync_worker.c' , expected = '0' , cflags = ['-lidbstore.js' , f'-DSECRET="{ secret } "' , '-O3' , '-g2' , '--proxy-to-worker' , '-sASYNCIFY' ])
1453
+ self .btest ('test_idbstore_sync_worker.c' , expected = '0' , cflags = ['-lidbstore.js' , f'-DSECRET="{ secret } "' , '-O3' , '-g2' , '--proxy-to-worker' , '-Wno-deprecated' , '- sASYNCIFY' ])
1454
1454
1455
1455
def test_force_exit (self ):
1456
1456
self .btest_exit ('test_force_exit.c' )
@@ -1619,7 +1619,7 @@ def test_mmap_lazyfile(self):
1619
1619
FS.createLazyFile('/', "lazy.txt", "lazydata.dat", true, false);
1620
1620
}
1621
1621
''' )
1622
- self .cflags += ['--pre-js=pre.js' , '--proxy-to-worker' ]
1622
+ self .cflags += ['--pre-js=pre.js' , '--proxy-to-worker' , '-Wno-deprecated' ]
1623
1623
self .btest_exit ('test_mmap_lazyfile.c' )
1624
1624
1625
1625
@no_wasmfs ('https://github.com/emscripten-core/emscripten/issues/19608' )
@@ -1715,7 +1715,7 @@ def test_glgears_pthreads(self, extra_args=[]): # noqa
1715
1715
@parameterized ({
1716
1716
'' : ([],),
1717
1717
# Enabling FULL_ES3 also enables ES2 automatically
1718
- 'proxy' : (['--proxy-to-worker' ],),
1718
+ 'proxy' : (['--proxy-to-worker' , '-Wno-deprecated' ],),
1719
1719
})
1720
1720
def test_glgears_long (self , args ):
1721
1721
args += ['-DHAVE_BUILTIN_SINCOS' , '-DLONGTEST' , '-lGL' , '-lglut' , '-DANIMATE' ]
@@ -1886,7 +1886,7 @@ def test_emscripten_main_loop_and_blocker_exit(self):
1886
1886
1887
1887
@parameterized ({
1888
1888
'' : ([],),
1889
- 'worker' : (['--proxy-to-worker' ],),
1889
+ 'worker' : (['--proxy-to-worker' , '-Wno-deprecated' ],),
1890
1890
'pthreads' : (['-pthread' , '-sPROXY_TO_PTHREAD' ],),
1891
1891
'strict' : (['-sSTRICT' ],),
1892
1892
})
@@ -3098,7 +3098,7 @@ def test_sdl2_image_prepare_data(self):
3098
3098
@proxied
3099
3099
def test_sdl2_canvas_proxy (self ):
3100
3100
create_file ('data.txt' , 'datum' )
3101
- self .reftest ('test_sdl2_canvas_proxy.c' , 'test_sdl2_canvas.png' , cflags = ['-sUSE_SDL=2' , '--proxy-to-worker' , '--preload-file' , 'data.txt' ])
3101
+ self .reftest ('test_sdl2_canvas_proxy.c' , 'test_sdl2_canvas.png' , cflags = ['-sUSE_SDL=2' , '--proxy-to-worker' , '-Wno-deprecated' , '- -preload-file' , 'data.txt' ])
3102
3102
3103
3103
def test_sdl2_pumpevents (self ):
3104
3104
# key events should be detected using SDL_PumpEvents
@@ -3174,7 +3174,7 @@ def test_sdl2_canvas_write(self):
3174
3174
@requires_graphics_hardware
3175
3175
@proxied
3176
3176
def test_sdl2_gl_frames_swap (self ):
3177
- self .reftest ('test_sdl2_gl_frames_swap.c' , 'test_sdl2_gl_frames_swap.png' , cflags = ['--proxy-to-worker' , '-sUSE_SDL=2' ])
3177
+ self .reftest ('test_sdl2_gl_frames_swap.c' , 'test_sdl2_gl_frames_swap.png' , cflags = ['--proxy-to-worker' , '-Wno-deprecated' , '- sUSE_SDL=2' ])
3178
3178
3179
3179
@requires_graphics_hardware
3180
3180
def test_sdl2_ttf (self ):
@@ -3583,7 +3583,7 @@ def do_run(src, expected_output, cflags):
3583
3583
''' % expected_output )
3584
3584
# --proxy-to-worker only on main
3585
3585
if inworker :
3586
- cflags += ['--proxy-to-worker' ]
3586
+ cflags += ['--proxy-to-worker' , '-Wno-deprecated' ]
3587
3587
self .btest_exit ('test_dylink_dso_needed.c' , cflags = ['--post-js' , 'post.js' ] + cflags )
3588
3588
3589
3589
self ._test_dylink_dso_needed (do_run )
@@ -4098,7 +4098,7 @@ def test_pthread_asan_use_after_free(self):
4098
4098
@also_with_wasmfs
4099
4099
def test_pthread_asan_use_after_free_2 (self ):
4100
4100
# similiar to test_pthread_asan_use_after_free, but using a pool instead
4101
- # of proxy-to-pthread, and also the allocation happens on the pthread
4101
+ # of proxy-to-pthread, and al, '-Wno-experimental'so the allocation happens on the pthread
4102
4102
# (which tests that it can use the offset converter to get the stack
4103
4103
# trace there)
4104
4104
self .btest ('pthread/test_pthread_asan_use_after_free_2.cpp' , expected = '1' , cflags = ['-fsanitize=address' , '-pthread' , '-sPTHREAD_POOL_SIZE=1' , '--pre-js' , test_file ('pthread/test_pthread_asan_use_after_free_2.js' )])
@@ -4151,21 +4151,21 @@ def test_sigalrm(self):
4151
4151
self .btest_exit ('test_sigalrm.c' , cflags = ['-O3' ])
4152
4152
4153
4153
def test_canvas_style_proxy (self ):
4154
- self .btest ('canvas_style_proxy.c' , expected = '1' , cflags = ['--proxy-to-worker' , '--shell-file' , test_file ('canvas_style_proxy_shell.html' ), '--pre-js' , test_file ('canvas_style_proxy_pre.js' )])
4154
+ self .btest ('canvas_style_proxy.c' , expected = '1' , cflags = ['--proxy-to-worker' , '-Wno-deprecated' , '- -shell-file' , test_file ('canvas_style_proxy_shell.html' ), '--pre-js' , test_file ('canvas_style_proxy_pre.js' )])
4155
4155
4156
4156
def test_canvas_size_proxy (self ):
4157
- self .btest ('canvas_size_proxy.c' , expected = '0' , cflags = ['--proxy-to-worker' ])
4157
+ self .btest ('canvas_size_proxy.c' , expected = '0' , cflags = ['--proxy-to-worker' , '-Wno-deprecated' ])
4158
4158
4159
4159
def test_custom_messages_proxy (self ):
4160
- self .btest ('custom_messages_proxy.c' , expected = '1' , cflags = ['--proxy-to-worker' , '--shell-file' , test_file ('custom_messages_proxy_shell.html' ), '--post-js' , test_file ('custom_messages_proxy_postjs.js' )])
4160
+ self .btest ('custom_messages_proxy.c' , expected = '1' , cflags = ['--proxy-to-worker' , '-Wno-deprecated' , '- -shell-file' , test_file ('custom_messages_proxy_shell.html' ), '--post-js' , test_file ('custom_messages_proxy_postjs.js' )])
4161
4161
4162
4162
@parameterized ({
4163
4163
'' : ([],),
4164
4164
'O1' : (['-O1' ],),
4165
4165
'O2' : (['-O2' ],),
4166
4166
})
4167
4167
def test_vanilla_html_when_proxying (self , args ):
4168
- self .compile_btest ('browser_test_hello_world.c' , ['-o' , 'test.js' , '--proxy-to-worker' ] + args )
4168
+ self .compile_btest ('browser_test_hello_world.c' , ['-o' , 'test.js' , '--proxy-to-worker' , '-Wno-deprecated' ] + args )
4169
4169
create_file ('test.html' , '<script src="test.js"></script>' )
4170
4170
self .run_browser ('test.html' , '/report_result?0' )
4171
4171
@@ -4561,8 +4561,7 @@ def test_fetch_sync(self):
4561
4561
@also_with_wasm2js
4562
4562
def test_fetch_sync_xhr_in_proxy_to_worker (self ):
4563
4563
shutil .copy (test_file ('gears.png' ), '.' )
4564
- self .btest_exit ('fetch/test_fetch_sync_xhr.cpp' ,
4565
- cflags = ['-sFETCH_DEBUG' , '-sFETCH' , '--proxy-to-worker' ])
4564
+ self .btest_exit ('fetch/test_fetch_sync_xhr.cpp' , cflags = ['-sFETCH_DEBUG' , '-sFETCH' , '--proxy-to-worker' , '-Wno-deprecated' ])
4566
4565
4567
4566
@disabled ('https://github.com/emscripten-core/emscripten/issues/16746' )
4568
4567
def test_fetch_idb_store (self ):
@@ -4817,7 +4816,7 @@ def test_single_file_locate_file(self):
4817
4816
4818
4817
# Tests that SINGLE_FILE works as intended in a Worker in JS output
4819
4818
def test_single_file_worker_js (self ):
4820
- self .compile_btest ('browser_test_hello_world.c' , ['-o' , 'test.js' , '--proxy-to-worker' , '-sSINGLE_FILE' ])
4819
+ self .compile_btest ('browser_test_hello_world.c' , ['-o' , 'test.js' , '--proxy-to-worker' , '-Wno-deprecated' , '- sSINGLE_FILE' ])
4821
4820
create_file ('test.html' , '<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></head><body><script src="test.js"></script></body></html>' )
4822
4821
self .run_browser ('test.html' , '/report_result?0' )
4823
4822
self .assertExists ('test.js' )
0 commit comments