tools/testbuild.sh: Verify nuttx/apps folder clean after build

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-04-19 17:51:59 +08:00 committed by patacongo
parent 48e6b97ca7
commit 95e5506637

View File

@ -165,16 +165,12 @@ function makefunc {
# Clean up after the last build
function distclean_with_git {
git -C $nuttx clean -xfdq
git -C $APPSDIR clean -xfdq
}
function distclean {
echo " Cleaning..."
if [ -f .config ]; then
echo " Cleaning..."
if [ ${GITCLEAN} -eq 1 ]; then
distclean_with_git
git -C $nuttx clean -xfdq
git -C $APPSDIR clean -xfdq
else
makefunc ${JOPTION} distclean
fi
@ -224,6 +220,19 @@ function build {
if ! ./tools/refresh.sh --silent $config; then
fail=1
fi
# Ensure nuttx and apps directory in clean state
if [ -d $nuttx/.git ] || [ -d $APPSDIR/.git ]; then
if [[ -n $(git -C $nuttx status -s) ]]; then
git -C $nuttx status
fail=1
fi
if [[ -n $(git -C $APPSDIR status -s) ]]; then
git -C $APPSDIR status
fail=1
fi
fi
}
# Coordinate the steps for the next build test