tools/testbuild.sh: Verify nuttx/apps folder clean after build
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
48e6b97ca7
commit
95e5506637
@ -165,16 +165,12 @@ function makefunc {
|
|||||||
|
|
||||||
# Clean up after the last build
|
# Clean up after the last build
|
||||||
|
|
||||||
function distclean_with_git {
|
function distclean {
|
||||||
|
echo " Cleaning..."
|
||||||
|
if [ -f .config ]; then
|
||||||
|
if [ ${GITCLEAN} -eq 1 ]; then
|
||||||
git -C $nuttx clean -xfdq
|
git -C $nuttx clean -xfdq
|
||||||
git -C $APPSDIR clean -xfdq
|
git -C $APPSDIR clean -xfdq
|
||||||
}
|
|
||||||
|
|
||||||
function distclean {
|
|
||||||
if [ -f .config ]; then
|
|
||||||
echo " Cleaning..."
|
|
||||||
if [ ${GITCLEAN} -eq 1 ]; then
|
|
||||||
distclean_with_git
|
|
||||||
else
|
else
|
||||||
makefunc ${JOPTION} distclean
|
makefunc ${JOPTION} distclean
|
||||||
fi
|
fi
|
||||||
@ -224,6 +220,19 @@ function build {
|
|||||||
if ! ./tools/refresh.sh --silent $config; then
|
if ! ./tools/refresh.sh --silent $config; then
|
||||||
fail=1
|
fail=1
|
||||||
fi
|
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
|
# Coordinate the steps for the next build test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user