diff --git a/tools/testbuild.sh b/tools/testbuild.sh index a5b0221db94..8025f1d7e7e 100755 --- a/tools/testbuild.sh +++ b/tools/testbuild.sh @@ -151,10 +151,15 @@ function makefunc { # Clean up after the last build +function distclean_with_git { + git -C $nuttx clean -xfdq + git -C $APPSDIR clean -xfdq +} + function distclean { if [ -f .config ]; then echo " Cleaning..." - makefunc ${JOPTION} ${MAKE_FLAGS} distclean 1>/dev/null + distclean_with_git || makefunc ${JOPTION} ${MAKE_FLAGS} distclean 1>/dev/null fi }