Skip to content

Commit

Permalink
add stderr log detect
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar committed May 13, 2022
1 parent df4f60e commit 631f2fb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/tiup-cluster/script/detect_error.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
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"

0 comments on commit 631f2fb

Please sign in to comment.