diff options
author | Alexey Neyman <stilor@att.net> | 2019-02-14 23:08:01 (GMT) |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2019-02-14 23:08:01 (GMT) |
commit | 7c7eca2fab5a5a548c08b3ad48030788b8cb853b (patch) | |
tree | 36a4fe2d8cb10ddd6afdd5aa203702a905aa7a6b /scripts/functions | |
parent | fb744d81588395a97cee951a151a56501a500e42 (diff) |
Improve error detection
... by filtering the messages that contain a *word* "warning" or
"error", i.e. is preceded by a space or is at the beginning of the line.
This improves the output from new uClibc-ng releases - which produce a
warning about an unused label, `mprot_error`.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/functions b/scripts/functions index f71ea04..e577b9d 100644 --- a/scripts/functions +++ b/scripts/functions @@ -283,13 +283,15 @@ CT_DoLog() { _prog_bar[3]='|' indent=$((2*CT_STEP_COUNT)) while read line; do - case "${CT_LOG_SEE_TOOLS_WARN},${line}" in - y,*"warning:"*) cur_L=WARN; cur_l=${CT_LOG_LEVEL_WARN};; - y,*"WARNING:"*) cur_L=WARN; cur_l=${CT_LOG_LEVEL_WARN};; - *"error:"*) cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};; - *"Error:"*) cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};; - *"make["*"]: ***"*) cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};; - *) cur_L="${LEVEL}"; cur_l="${level}";; + case "${CT_LOG_SEE_TOOLS_WARN:-n},${line}" in + y,*[[:space:]][Ww]arning:*|y,[Ww]arning:*|y,*[[:space:]]WARNING:*|y,WARNING:*) + cur_L=WARN; cur_l=${CT_LOG_LEVEL_WARN};; + *[[:space:]][Ee]rror:*|[yn],[Ee]rror:*) + cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};; + *"make["*"]: ***"*) + cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};; + *) + cur_L="${LEVEL}"; cur_l="${level}";; esac # There will always be a log file (stdout, fd #1), be it /dev/null if [ -n "${CT_LOG_ENABLED}" ]; then |