Skip to content

Commit feea131

Browse files
committed
check-build-and-verify.sh: suppress htmlunit log messages in the robotframework output.
Workaround for #538
1 parent 7b7d69d commit feea131

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

src/main/scripts/ci/common.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,11 @@ print_log() {
1717
echo
1818
echo "=====> \033[1;33m$msg\033[0m"
1919
echo
20-
egrep -v '^\[INFO\] Download(ing|ed):' "$log_file"
20+
# yes, it's a hard coded workaround for #538
21+
if [ "$log_file" = 'verify.log' ]; then
22+
# we need -z option to be able to replace new line character
23+
egrep -v '^\[INFO\] Download(ing|ed):' "$log_file" | sed -z -f "$(dirname "$0")/ignore-htmlunit-messages.sed"
24+
else
25+
egrep -v '^\[INFO\] Download(ing|ed):' "$log_file"
26+
fi
2127
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# This script is filtering out log messages from htmlunit.
3+
# It's a workaround for https://github.com/php-coder/mystamps/issues/538
4+
#
5+
# IMPORTANT: script should be executed with `sed -z` to be able to replace new line character.
6+
#
7+
8+
# [INFO] Bad input type: "url", creating a text input
9+
s|\[INFO\] Bad input type: "url", creating a text input\n||g
10+
11+
# [WARNING] CSS error: 'http://127.0.0.1:8081/public/bootstrap/3.3.7/css/bootstrap.min.css' [5:56298] Error in expression; ':' found after identifier "progid".
12+
s|\[WARNING\] CSS error: '[^']\+' \[[^]]\+\] Error in expression; [^\.]\+\.\n||g
13+
14+
# [WARNING] CSS error: 'http://127.0.0.1:8081/public/bootstrap/3.3.7/css/bootstrap.min.css' [5:115558] Invalid color "#000\9".
15+
s|\[WARNING\] CSS error: '[^']\+' \[[^]]\+\] Invalid color "[^"]\+"\.\n||g
16+
17+
# [WARNING] CSS error: 'http://127.0.0.1:8081/public/selectize/0.12.3/css/selectize.bootstrap3.css' [176:3] Error in declaration. '*' is not allowed as first char of a property.
18+
s|\[WARNING\] CSS error: '[^']\+' \[[^]]\+\] Error in declaration\. '\*' is not allowed as first char of a property\.\n||g
19+
20+
# Simplify error message and make it match the next filter.
21+
# [ERROR] runtimeError: message=[An invalid or illegal selector was specified (selector: '[id='sizzle-1487943406281'] [data-selectable]:first' error: Invalid selector: [id="sizzle-1487943406281"] [data-selectable]:first).] sourceName=[http://127.0.0.1:8081/public/jquery/1.9.1/jquery.min.js] line=[4] lineSource=[null] lineOffset=[0]
22+
s|\(selector: '\[id='sizzle-[^']\+'\] \[data-selectable\]:first' error: Invalid selector: \[id="sizzle-[^"]\+"\] \[data-selectable\]:first\)||g
23+
24+
# [ERROR] runtimeError: message=[An invalid or illegal selector was specified (selector: '*,:x' error: Invalid selector: :x).] sourceName=[http://127.0.0.1:8081/public/jquery/1.9.1/jquery.min.js] line=[4] lineSource=[null] lineOffset=[0]
25+
s|\[ERROR\] runtimeError: message=\[[^]]\+\] sourceName=\[[^]]\+\] line=\[[^]]\+\] lineSource=\[[^]]\+\] lineOffset=\[[^]]\+\]\n||g

0 commit comments

Comments
 (0)