Skip to content

Commit 49988b5

Browse files
committed
feedback
1 parent f4fe068 commit 49988b5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/runner.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,23 +1476,23 @@ def reftest(self, expected, manually_trigger=False):
14761476
}
14771477
''' % (reporting.read(), basename, int(manually_trigger)))
14781478

1479-
def compile_btest(self, args, reporting=True, native_reporting=True):
1479+
def compile_btest(self, args, js_reporting=True, c_reporting=True):
14801480
# add in support for reporting results. this adds an include a header so testcases can
14811481
# use REPORT_RESULT, and also adds a cpp file to be compiled alongside the testcase, which
14821482
# contains the implementation of REPORT_RESULT (we can't just include that implementation in
14831483
# the header as there may be multiple files being compiled here).
14841484
args += ['-s', 'IN_TEST_HARNESS=1']
1485-
if reporting:
1485+
if js_reporting:
14861486
# For basic reporting we inject JS helper funtions to report result back to server.
14871487
args += ['-DEMTEST_PORT_NUMBER=%d' % self.port,
14881488
'--pre-js', path_from_root('tests', 'browser_reporting.js')]
1489-
if native_reporting:
1490-
# If native code reporting (i.e. REPORT_RESULT macro) is required
1491-
# also compiling in report_result.cpp and forice-include report_result.h
1492-
assert(reporting)
1493-
args += ['-I', path_from_root('tests'),
1494-
'-include', path_from_root('tests', 'report_result.h'),
1495-
path_from_root('tests', 'report_result.cpp')]
1489+
if c_reporting:
1490+
# If native code reporting (i.e. REPORT_RESULT macro) is required
1491+
# also compiling in report_result.cpp and forice-include report_result.h
1492+
assert(js_reporting)
1493+
args += ['-I', path_from_root('tests'),
1494+
'-include', path_from_root('tests', 'report_result.h'),
1495+
path_from_root('tests', 'report_result.cpp')]
14961496
self.run_process([EMCC] + self.get_emcc_args() + args)
14971497

14981498
def btest_exit(self, filename, expected, *args, **kwargs):
@@ -1503,7 +1503,7 @@ def btest_exit(self, filename, expected, *args, **kwargs):
15031503
REPORT_RESULT macro to the native code.
15041504
"""
15051505
self.set_setting('EXIT_RUNTIME')
1506-
kwargs['native_reporting'] = False
1506+
kwargs['c_reporting'] = False
15071507
kwargs['expected'] = 'exit:%s' % expected
15081508
return self.btest(filename, *args, **kwargs)
15091509

@@ -1512,7 +1512,7 @@ def btest(self, filename, expected=None, reference=None, force_c=False,
15121512
args=None, message='.', also_proxied=False,
15131513
url_suffix='', timeout=None, also_asmjs=False,
15141514
manually_trigger_reftest=False, extra_tries=1,
1515-
reporting=True, native_reporting=True):
1515+
js_reporting=True, c_reporting=True):
15161516
assert expected or reference, 'a btest must either expect an output, or have a reference image'
15171517
if args is None:
15181518
args = []
@@ -1536,7 +1536,7 @@ def btest(self, filename, expected=None, reference=None, force_c=False,
15361536
args = [filepath, '-o', outfile] + args
15371537
# print('all args:', args)
15381538
try_delete(outfile)
1539-
self.compile_btest(args, reporting=reporting, native_reporting=native_reporting)
1539+
self.compile_btest(args, js_reporting=reporting, c_reporting=c_reporting)
15401540
self.assertExists(outfile)
15411541
if post_build:
15421542
post_build()

0 commit comments

Comments
 (0)