From 2267048e72c4163fd6c33af9afede75c0184fc26 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Sat, 9 May 2020 23:49:08 +0800 Subject: [PATCH] fix memory error formula in .travis. reduce threshold to 5. --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 17ede412d2..2cb7b8e966 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,12 +59,12 @@ matrix: GREEN_UNDERLINE='\033[4;32m' NC='\033[0m' - grep 'ERROR SUMMARY' mem-error-out.txt | uniq | tee uniq-mem-error-out.txt + grep 'ERROR SUMMARY' mem-error-out.txt|grep -v 'grep'|uniq|tee uniq-mem-error-out.txt for memError in `cat uniq-mem-error-out.txt | awk '{print $4}'` do if [ -n "$memError" ]; then - if [ "$memError" -gt 16 ]; then + if [ "$memError" -gt 5 ]; then echo -e "${RED} ## Memory errors number valgrind reports is $memError.\ More than our threshold! ## ${NC}" travis_terminate $memError @@ -72,11 +72,11 @@ matrix: fi done - grep 'definitely lost:' mem-error-out.txt | uniq | tee uniq-definitely-lost-out.txt - for defiMemError in `cat uniq-definitely-lost-out.txt | awk '{print $4}'` + grep 'definitely lost:' mem-error-out.txt|grep -v 'grep'|uniq|tee uniq-definitely-lost-out.txt + for defiMemError in `cat uniq-definitely-lost-out.txt | awk '{print $7}'` do if [ -n "$defiMemError" ]; then - if [ "$defiMemError" -gt 16 ]; then + if [ "$defiMemError" -gt 3 ]; then echo -e "${RED} ## Memory errors number valgrind reports \ Definitely lost is $defiMemError. More than our threshold! ## ${NC}" travis_terminate $defiMemError -- GitLab