From 631f2fb2a906a71aa8d4a541ee2bc03674d79bca Mon Sep 17 00:00:00 2001 From: nexustar Date: Fri, 13 May 2022 17:39:17 +0800 Subject: [PATCH] add stderr log detect --- tests/tiup-cluster/script/detect_error.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/tiup-cluster/script/detect_error.sh b/tests/tiup-cluster/script/detect_error.sh index 8adf8eb500..b22c02397c 100755 --- a/tests/tiup-cluster/script/detect_error.sh +++ b/tests/tiup-cluster/script/detect_error.sh @@ -3,8 +3,14 @@ set -eu err_num=$(find $1 -name "*.log" -exec grep "\[ERROR\]" {} \; | wc -l) if [ ${err_num} != "0" ]; then - echo ${err_num} + echo "detect ${err_num} [ERROR] log" exit 1 fi -echo "no error log found" \ No newline at end of file +err_num=$(find $1 -name "*stderr.log" -exec cat {} \; | wc -l) +if [ ${err_num} != "0" ]; then + echo "detect ${err_num} stderr log" + exit 1 +fi + +echo "no error log found"