diff --git a/Makefile b/Makefile index 5df70507..54c9e7fe 100644 --- a/Makefile +++ b/Makefile @@ -130,6 +130,7 @@ check: unit itest itest-only: @$(call print, "Running integration tests with ${backend} backend.") $(ITEST) + lntest/itest/log_check_errors.sh itest: btcd build-itest itest-only diff --git a/lntest/itest/log_check_errors.sh b/lntest/itest/log_check_errors.sh new file mode 100755 index 00000000..80d6a07d --- /dev/null +++ b/lntest/itest/log_check_errors.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +BASEDIR=$(dirname "$0") + +# 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 | \ +sort | uniq | \ +grep -Fv -f $BASEDIR/log_error_whitelist.txt + +# If something shows up (not on whitelist) exit with error code 1. +test $? -eq 1 diff --git a/lntest/itest/log_error_whitelist.txt b/lntest/itest/log_error_whitelist.txt new file mode 100644 index 00000000..17156000 --- /dev/null +++ b/lntest/itest/log_error_whitelist.txt @@ -0,0 +1,158 @@ +