testbuild.sh: Use git clean instead of make distclean

As the former is considerably faster.
This commit is contained in:
YAMAMOTO Takashi
2020-04-02 13:43:21 +09:00
committed by Xiang Xiao
parent da48d912e4
commit 27142b2e3c

View File

@@ -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
}