2727from  tools  import  shared 
2828from  tools  import  ports 
2929from  tools  import  utils 
30- from  tools .shared  import  EMCC , WINDOWS , FILE_PACKAGER , PIPE 
30+ from  tools .shared  import  EMCC , WINDOWS , FILE_PACKAGER , PIPE ,  DEBUG 
3131from  tools .utils  import  delete_dir 
3232
3333
@@ -82,6 +82,8 @@ def also_with_wasmfs(f):
8282
8383  @wraps (f ) 
8484  def  metafunc (self , wasmfs , * args , ** kwargs ):
85+     if  DEBUG :
86+       print ('parameterize:wasmfs=%d'  %  wasmfs )
8587    if  wasmfs :
8688      self .set_setting ('WASMFS' )
8789      self .emcc_args  =  self .emcc_args .copy () +  ['-DWASMFS' ]
@@ -100,6 +102,8 @@ def also_with_proxying(f):
100102
101103  @wraps (f ) 
102104  def  metafunc (self , proxied , * args , ** kwargs ):
105+     if  DEBUG :
106+       print ('parameterize:proxied=%d'  %  proxied )
103107    self .proxied  =  proxied 
104108    f (self , * args , ** kwargs )
105109
@@ -901,7 +905,7 @@ def test_sdl_canvas_alpha(self):
901905    '' : (False ,), 
902906    'delay' : (True ,) 
903907  }) 
904-   def  test_sdl_key (self , delay , async_ , defines ):
908+   def  test_sdl_key (self , defines , async_ , delay ):
905909    if  delay :
906910      settimeout_start  =  'setTimeout(function() {' 
907911      settimeout_end  =  '}, 1);' 
@@ -1970,11 +1974,11 @@ def test_cubegeom_pre2(self):
19701974  def  test_cubegeom_pre3 (self ):
19711975    self .reftest ('third_party/cubegeom/cubegeom_pre3.c' , 'third_party/cubegeom/cubegeom_pre2.png' , args = ['-sLEGACY_GL_EMULATION' , '-lGL' , '-lSDL' ])
19721976
1977+   @also_with_proxying  
19731978  @parameterized ({ 
19741979    '' : ([],), 
19751980    'tracing' : (['-sTRACE_WEBGL_CALLS' ],), 
19761981  }) 
1977-   @also_with_proxying  
19781982  @requires_graphics_hardware  
19791983  def  test_cubegeom (self , args ):
19801984    if  self .proxied  and  args :
@@ -2725,11 +2729,11 @@ def test_wget_data(self):
27252729    create_file ('test.txt' , 'emscripten' )
27262730    self .btest_exit ('test_wget_data.c' , args = ['-O2' , '-g2' , '-sASYNCIFY' ])
27272731
2732+   @also_with_wasm2js  
27282733  @parameterized ({ 
27292734    '' : ([],), 
27302735    'es6' : (['-sEXPORT_ES6' ],), 
27312736  }) 
2732-   @also_with_wasm2js  
27332737  def  test_locate_file (self , args ):
27342738    self .set_setting ('EXIT_RUNTIME' )
27352739    create_file ('src.c' , r''' 
@@ -4106,11 +4110,11 @@ def test_utf8_textdecoder(self):
41064110  def  test_utf16_textdecoder (self ):
41074111    self .btest_exit ('benchmark/benchmark_utf16.cpp' , 0 , args = ['--embed-file' , test_file ('utf16_corpus.txt' ) +  '@/utf16_corpus.txt' , '-sEXPORTED_RUNTIME_METHODS=UTF16ToString,stringToUTF16,lengthBytesUTF16' ])
41084112
4113+   @also_with_threads  
41094114  @parameterized ({ 
41104115    '' : ([],), 
41114116    'closure' : (['--closure=1' ],), 
41124117  }) 
4113-   @also_with_threads  
41144118  def  test_TextDecoder (self , args ):
41154119    self .emcc_args  +=  args 
41164120
@@ -4338,7 +4342,7 @@ def test_webgl_resize_offscreencanvas_from_main_thread(self, args1, args2, args3
43384342    'enable' : (1 ,), 
43394343    'disable' : (0 ,), 
43404344  }) 
4341-   def  test_webgl_simple_extensions (self , simple_enable_extensions ,  webgl_version ):
4345+   def  test_webgl_simple_extensions (self , webgl_version ,  simple_enable_extensions ):
43424346    cmd  =  ['-DWEBGL_CONTEXT_VERSION='  +  str (webgl_version ),
43434347           '-DWEBGL_SIMPLE_ENABLE_EXTENSION='  +  str (simple_enable_extensions ),
43444348           '-sMAX_WEBGL_VERSION=2' ,
@@ -4393,12 +4397,12 @@ def test_fetch_to_memory(self):
43934397      self .btest_exit ('fetch/test_fetch_to_memory.cpp' ,
43944398                      args = ['-sFETCH_DEBUG' , '-sFETCH' ] +  arg )
43954399
4400+   @also_with_wasm2js  
43964401  @parameterized ({ 
43974402    '' : ([],), 
43984403    'pthread_exit' : (['-DDO_PTHREAD_EXIT' ],), 
43994404  }) 
44004405  @no_firefox ('https://github.com/emscripten-core/emscripten/issues/16868' ) 
4401-   @also_with_wasm2js  
44024406  def  test_fetch_from_thread (self , args ):
44034407    shutil .copy (test_file ('gears.png' ), '.' )
44044408    self .btest_exit ('fetch/test_fetch_from_thread.cpp' ,
@@ -4628,11 +4632,11 @@ def test_single_file_html(self):
46284632    self .assertNotExists ('test.wasm' )
46294633
46304634  # Tests that SINGLE_FILE works as intended in generated HTML with MINIMAL_RUNTIME 
4635+   @also_with_wasm2js  
46314636  @parameterized ({ 
46324637    '' : ([],), 
46334638    'O3' : (['-O3' ],) 
46344639  }) 
4635-   @also_with_wasm2js  
46364640  def  test_minimal_runtime_single_file_html (self , opts ):
46374641    self .btest ('single_file_static_initializer.cpp' , '19' , args = opts  +  ['-sMINIMAL_RUNTIME' , '-sSINGLE_FILE' ])
46384642    self .assertExists ('test.html' )
0 commit comments