name: run tests
command: |
source ./emsdk/emsdk_env.sh
- python3 testsuite/emscripten/quiet_emcc_info.py
testsuite/emscripten/node-tests.sh << parameters.params >>
workflows:
+++ /dev/null
-"""
-Prevent emcc from printing info level logging
-
-dejagnu will fail tests because of these log statements and the messages depend
-on emscripten cache state so xfailing the right tests is very hard.
-
-See emscripten issue:
-https://github.com/emscripten-core/emscripten/issues/18607
-"""
-
-from pathlib import Path
-from shutil import which
-from sys import exit
-from textwrap import dedent
-
-EMCC_PATH = Path(which("emcc") + ".py")
-
-emcc_text = EMCC_PATH.read_text()
-if "# quiet_emcc_info patch" in emcc_text:
- exit(0)
-
-emcc_lines = emcc_text.splitlines()
-emcc_lines.insert(
- 1,
- dedent(
- """
- # quiet_emcc_info patch
- import logging
- for name in ["cache", "system_libs", "shared"]:
- logger = logging.getLogger(name)
- logger.setLevel(logging.WARN)
- """
- ),
-)
-
-EMCC_PATH.write_text("\n".join(emcc_lines))
regsub -all "(^|\n)\[^\n\]*unable to perform all requested operations" $text "" text
# We get this from sparc64 linux systems
regsub -all "(^|\n)\[^\n\]*warning: .* has a LOAD segment with RWX permissions" $text "" text
+ # Ignore Emscripten INFO messages
+ regsub -all "(^|\n)(cache|shared):INFO:\[^\n\]*" $text "" text
return $text
}