File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -754,10 +754,20 @@ run_and_print_on_failure() {
754754 # Filter output on Warnings/Errors and add two lines of context
755755 regex=' ([Ww]arning:|[Ee]rror:)'
756756 if grep_q -E " $regex " " $temp_output_file " ; then
757- log_debug " Found warnings/errors in output from command:" " $@ "
758- echo " --- Start of Warnings/Errors ---"
759- grep_c 2 -E " $regex " " $temp_output_file "
760- echo " --- End of Warnings/Errors ---"
757+ # Known-benign patterns that are not actionable and should be suppressed:
758+ # - automake subdir-objects: forward-compatibility notice, harmless
759+ # - libtool install warnings: normal when using DESTDIR
760+ # shellcheck disable=SC3043
761+ local benign=' subdir-objects|libtool: warning: remember to run|libtool: warning:.*has not been installed|libtool: install:'
762+ # shellcheck disable=SC3043
763+ local filtered
764+ filtered=$( grep_c 2 -E " $regex " " $temp_output_file " | grep -v -E " $benign " ) || true
765+ if [ -n " $filtered " ]; then
766+ log_debug " Found warnings/errors in output from command:" " $@ "
767+ echo " --- Start of Warnings/Errors ---"
768+ printf ' %s\n' " $filtered "
769+ echo " --- End of Warnings/Errors ---"
770+ fi
761771 fi
762772 else
763773 # Print all output
You can’t perform that action at this time.
0 commit comments