Skip to content

Commit 02b5a05

Browse files
authored
[test] Reduce logging shown in the test suite. NFC (emscripten-core#23699)
This prevents each thread that gets started from printing: `shared:INFO: (Emscripten: Running sanity checks)`.
1 parent c50c33d commit 02b5a05

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

test/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ def set_temp_dir(self, temp_dir):
11671167
@classmethod
11681168
def setUpClass(cls):
11691169
super().setUpClass()
1170-
shared.check_sanity(force=True)
1170+
shared.check_sanity(force=True, quiet=True)
11711171

11721172
def setUp(self):
11731173
super().setUp()

tools/shared.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def generate_sanity():
411411

412412

413413
@memoize
414-
def perform_sanity_checks():
414+
def perform_sanity_checks(quiet=False):
415415
# some warning, mostly not fatal checks - do them even if EM_IGNORE_SANITY is on
416416
check_node_version()
417417
check_llvm_version()
@@ -422,7 +422,8 @@ def perform_sanity_checks():
422422
logger.info('EM_IGNORE_SANITY set, ignoring sanity checks')
423423
return
424424

425-
logger.info('(Emscripten: Running sanity checks)')
425+
if not quiet:
426+
logger.info('(Emscripten: Running sanity checks)')
426427

427428
if not llvm_ok:
428429
exit_with_error('failing sanity checks due to previous llvm failure')
@@ -436,7 +437,7 @@ def perform_sanity_checks():
436437

437438

438439
@ToolchainProfiler.profile()
439-
def check_sanity(force=False):
440+
def check_sanity(force=False, quiet=False):
440441
"""Check that basic stuff we need (a JS engine to compile, Node.js, and Clang
441442
and LLVM) exists.
442443
@@ -459,11 +460,11 @@ def check_sanity(force=False):
459460

460461
if config.FROZEN_CACHE:
461462
if force:
462-
perform_sanity_checks()
463+
perform_sanity_checks(quiet)
463464
return
464465

465466
if os.environ.get('EM_IGNORE_SANITY'):
466-
perform_sanity_checks()
467+
perform_sanity_checks(quiet)
467468
return
468469

469470
expected = generate_sanity()
@@ -482,7 +483,7 @@ def sanity_is_correct():
482483
# Even if the sanity file is up-to-date we still run the checks
483484
# when force is set.
484485
if force:
485-
perform_sanity_checks()
486+
perform_sanity_checks(quiet)
486487
return True # all is well
487488
return False
488489

0 commit comments

Comments
 (0)