Skip to content

Commit

Permalink
JS: avoid EMCC logging spurious failure
Browse files Browse the repository at this point in the history
emcc would sometime output messages like:

  cache:INFO: generating system asset: symbol_lists/424b44514e43d789148e69e4e7d1c7fdc0350b79.json... (this will be cached in "/emsdk/upstream/emscripten/cache/symbol_lists/424b44514e43d789148e69e4e7d1c7fdc0350b79.json" for subsequent builds)
  cache:INFO:  - ok

Cf emscripten-core/emscripten#18607

This breaks our tests matching the stderr output. We avoid this by setting EMCC_LOGGING=0
  • Loading branch information
hsyl20 authored and Marge Bot committed Feb 12, 2024
1 parent aef587f commit b71b392
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testsuite/driver/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
# Ensure that GHC doesn't go looking for environment files. See #21365.
ghc_env['GHC_ENVIRONMENT'] = "-"

# Ensure that EMCC doesn't output cache info
# (cf https://github.com/emscripten-core/emscripten/issues/18607)
os.environ['EMCC_LOGGING'] = '0'
ghc_env['EMCC_LOGGING'] = '0'

global config
config = getConfig() # get it from testglobals
config.validate()
Expand Down
2 changes: 2 additions & 0 deletions testsuite/driver/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2676,6 +2676,8 @@ def normalise_errmsg(s: str) -> str:
s = re.sub('.*strip: changes being made to the file will invalidate the code signature in.*\n','',s)
# clang may warn about unused argument when used as assembler
s = re.sub('.*warning: argument unused during compilation:.*\n', '', s)
# Emscripten displays cache info and old emcc doesn't support EMCC_LOGGING=0
s = re.sub('cache:INFO: .*\n', '', s)

return s

Expand Down

0 comments on commit b71b392

Please sign in to comment.