提交 ce944ebb 编写于 作者: S Shuduo Sang

reduce valgrind output.

上级 48be5788
...@@ -49,7 +49,7 @@ matrix: ...@@ -49,7 +49,7 @@ matrix:
./test-all.sh $TRAVIS_EVENT_TYPE || travis_terminate $? ./test-all.sh $TRAVIS_EVENT_TYPE || travis_terminate $?
cd ${TRAVIS_BUILD_DIR}/tests/pytest cd ${TRAVIS_BUILD_DIR}/tests/pytest
./valgrind-test.sh -g 2>&1 | tee mem-error-out.txt ./valgrind-test.sh -g 2>&1 > mem-error-out.txt
sleep 1 sleep 1
# Color setting # Color setting
...@@ -59,12 +59,13 @@ matrix: ...@@ -59,12 +59,13 @@ matrix:
GREEN_UNDERLINE='\033[4;32m' GREEN_UNDERLINE='\033[4;32m'
NC='\033[0m' NC='\033[0m'
grep 'ERROR SUMMARY' mem-error-out.txt|grep -v 'grep'|uniq|tee uniq-mem-error-out.txt grep 'start to execute\|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}'` for memError in `cat uniq-mem-error-out.txt | awk '{print $4}'`
do do
if [ -n "$memError" ]; then if [ -n "$memError" ]; then
if [ "$memError" -gt 12 ]; then if [ "$memError" -gt 12 ]; then
cat uniq-mem-error-out.txt
echo -e "${RED} ## Memory errors number valgrind reports is $memError.\ echo -e "${RED} ## Memory errors number valgrind reports is $memError.\
More than our threshold! ## ${NC}" More than our threshold! ## ${NC}"
travis_terminate $memError travis_terminate $memError
...@@ -72,11 +73,12 @@ matrix: ...@@ -72,11 +73,12 @@ matrix:
fi fi
done done
grep 'definitely lost:' mem-error-out.txt|grep -v 'grep'|uniq|tee uniq-definitely-lost-out.txt grep 'start to execute\|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}'` for defiMemError in `cat uniq-definitely-lost-out.txt | awk '{print $7}'`
do do
if [ -n "$defiMemError" ]; then if [ -n "$defiMemError" ]; then
if [ "$defiMemError" -gt 13 ]; then if [ "$defiMemError" -gt 13 ]; then
cat uniq-definitely-list-out.txt
echo -e "${RED} ## Memory errors number valgrind reports \ echo -e "${RED} ## Memory errors number valgrind reports \
Definitely lost is $defiMemError. More than our threshold! ## ${NC}" Definitely lost is $defiMemError. More than our threshold! ## ${NC}"
travis_terminate $defiMemError travis_terminate $defiMemError
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册