mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
itest: add error detection explanation
This commit is contained in:
parent
3190437188
commit
c0da0675c1
@ -2,6 +2,8 @@
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
|
||||
echo ""
|
||||
|
||||
# Filter all log files for errors, substitute variable data and match against whitelist.
|
||||
cat $BASEDIR/*.log | grep "\[ERR\]" | \
|
||||
sed -r -f $BASEDIR/log_substitutions.txt | \
|
||||
@ -9,4 +11,16 @@ sort | uniq | \
|
||||
grep -Fvi -f $BASEDIR/log_error_whitelist.txt
|
||||
|
||||
# If something shows up (not on whitelist) exit with error code 1.
|
||||
test $? -eq 1
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo ""
|
||||
echo "In the itest logs, the log line (patterns) above were detected."
|
||||
echo "[ERR] lines are generally reserved for internal errors."
|
||||
echo "Resolve the issue by either changing the log level or adding an "
|
||||
echo "exception to log_error_whitelist.txt"
|
||||
echo ""
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "No itest errors detected."
|
||||
echo ""
|
||||
|
Loading…
Reference in New Issue
Block a user