@@ -2366,25 +2366,25 @@ def run_browser(self, html_file, expected=None, message=None, timeout=None, extr
2366
2366
time .sleep (5 )
2367
2367
print ('(moving on..)' )
2368
2368
2369
- def compile_btest (self , filename , args , reporting = Reporting .FULL ):
2369
+ def compile_btest (self , filename , emcc_args , reporting = Reporting .FULL ):
2370
2370
# Inject support code for reporting results. This adds an include a header so testcases can
2371
2371
# use REPORT_RESULT, and also adds a cpp file to be compiled alongside the testcase, which
2372
2372
# contains the implementation of REPORT_RESULT (we can't just include that implementation in
2373
2373
# the header as there may be multiple files being compiled here).
2374
2374
if reporting != Reporting .NONE :
2375
2375
# For basic reporting we inject JS helper funtions to report result back to server.
2376
- args += ['--pre-js' , test_file ('browser_reporting.js' )]
2376
+ emcc_args += ['--pre-js' , test_file ('browser_reporting.js' )]
2377
2377
if reporting == Reporting .FULL :
2378
2378
# If C reporting (i.e. the REPORT_RESULT macro) is required we
2379
2379
# also include report_result.c and force-include report_result.h
2380
2380
self .run_process ([EMCC , '-c' , '-I' + TEST_ROOT ,
2381
- test_file ('report_result.c' )] + self .get_emcc_args (compile_only = True ) + (['-fPIC' ] if '-fPIC' in args else []))
2382
- args += ['report_result.o' , '-include' , test_file ('report_result.h' )]
2381
+ test_file ('report_result.c' )] + self .get_emcc_args (compile_only = True ) + (['-fPIC' ] if '-fPIC' in emcc_args else []))
2382
+ emcc_args += ['report_result.o' , '-include' , test_file ('report_result.h' )]
2383
2383
if EMTEST_BROWSER == 'node' :
2384
- args .append ('-DEMTEST_NODE' )
2384
+ emcc_args .append ('-DEMTEST_NODE' )
2385
2385
if not os .path .exists (filename ):
2386
2386
filename = test_file (filename )
2387
- self .run_process ([compiler_for (filename ), filename ] + self .get_emcc_args () + args )
2387
+ self .run_process ([compiler_for (filename ), filename ] + self .get_emcc_args () + emcc_args )
2388
2388
2389
2389
def btest_exit (self , filename , assert_returncode = 0 , * args , ** kwargs ):
2390
2390
"""Special case of `btest` that reports its result solely via exiting
@@ -2402,20 +2402,20 @@ def btest_exit(self, filename, assert_returncode=0, *args, **kwargs):
2402
2402
2403
2403
def btest (self , filename , expected = None ,
2404
2404
post_build = None ,
2405
- args = None , url_suffix = '' , timeout = None ,
2405
+ emcc_args = None , url_suffix = '' , timeout = None ,
2406
2406
extra_tries = 1 ,
2407
2407
reporting = Reporting .FULL ,
2408
2408
output_basename = 'test' ):
2409
2409
assert expected , 'a btest must have an expected output'
2410
- if args is None :
2411
- args = []
2412
- args = args .copy ()
2410
+ if emcc_args is None :
2411
+ emcc_args = []
2412
+ emcc_args = emcc_args .copy ()
2413
2413
filename = find_browser_test_file (filename )
2414
2414
outfile = output_basename + '.html'
2415
- args += ['-o' , outfile ]
2416
- # print('all args:', args )
2415
+ emcc_args += ['-o' , outfile ]
2416
+ # print('all args:', emcc_args )
2417
2417
utils .delete_file (outfile )
2418
- self .compile_btest (filename , args , reporting = reporting )
2418
+ self .compile_btest (filename , emcc_args , reporting = reporting )
2419
2419
self .assertExists (outfile )
2420
2420
if post_build :
2421
2421
post_build ()
0 commit comments