Merge pull request #15220 from aabadie/pr/tools/insufficient_memory_enh
tools/insufficient_memory: improve error handling and output
This commit is contained in:
commit
ee2679ff70
@ -12,18 +12,53 @@ if [ -z $1 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if tput colors &> /dev/null && [ $(tput colors) -ge 8 ]; then
|
||||||
|
COK="\e[1;32m"
|
||||||
|
CBIG="\e[1;34m"
|
||||||
|
CNORMAL="\e[1m"
|
||||||
|
CSKIP="\e[1;36m"
|
||||||
|
CERROR="\e[1;31m"
|
||||||
|
CWARN="\e[1;33m"
|
||||||
|
CRESET="\e[0m"
|
||||||
|
else
|
||||||
|
COK=
|
||||||
|
CBIG=
|
||||||
|
CNORMAL=
|
||||||
|
CSKIP=
|
||||||
|
CERROR=
|
||||||
|
CWARN=
|
||||||
|
CRESET=
|
||||||
|
fi
|
||||||
|
|
||||||
BOARD=$1
|
BOARD=$1
|
||||||
RIOTBASE=$(dirname $0)/../../..
|
RIOTBASE=$(dirname $0)/../../..
|
||||||
PROJECTS+=$RIOTBASE/examples/*/Makefile
|
APPLICATIONS+=examples/*/Makefile
|
||||||
PROJECTS+=" "
|
APPLICATIONS+=" "
|
||||||
PROJECTS+=$RIOTBASE/tests/*/Makefile
|
APPLICATIONS+=tests/*/Makefile
|
||||||
|
|
||||||
for i in $PROJECTS; do
|
# Use a standardized build within Docker and with minimal output
|
||||||
test=$(dirname $(realpath $i));
|
export BUILD_IN_DOCKER=1
|
||||||
if make BOARD=$BOARD -j -C $test 2>&1 >/dev/null | grep -e overflowed -e "not within region" > /dev/null; then
|
export DOCKER_MAKE_ARGS="-j4"
|
||||||
echo $(basename $test) is too big for $BOARD
|
export RIOT_CI_BUILD=1
|
||||||
make -f Makefile.for_sh -C $(dirname $0) DIR=$test BOARD=$BOARD Makefile.ci > /dev/null
|
|
||||||
|
for app in ${APPLICATIONS}; do
|
||||||
|
application=$(dirname ${app})
|
||||||
|
printf "${CNORMAL}%-40s${CRESET}" ${application}
|
||||||
|
output=$(make BOARD=${BOARD} -C ${RIOTBASE}/${application} 2>&1)
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
if echo ${output} | grep -e overflowed -e "not within region" > /dev/null; then
|
||||||
|
printf "${CBIG}%s${CRESET}\n" "too big"
|
||||||
|
make -f $(dirname $0)/Makefile.for_sh DIR=${RIOTBASE}/${application} BOARD=${BOARD} Makefile.ci > /dev/null
|
||||||
|
elif echo ${output} | grep -e "not whitelisted" -e "unsatisfied feature requirements" > /dev/null; then
|
||||||
|
printf "${CWARN}%s${CRESET}\n" "not supported"
|
||||||
|
else
|
||||||
|
printf "${CERROR}%s${CRESET}\n" "build failed"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo $(basename $test) is OK
|
if echo ${output} | grep -e "skipping link step" > /dev/null; then
|
||||||
|
printf "${CSKIP}%s${CRESET}\n" "skipped"
|
||||||
|
else
|
||||||
|
printf "${COK}%s${CRESET}\n" "OK"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user