testbuild.sh: Add -C option to skip tree cleanness check
Build-testing a dirty tree is convenient during development.
This commit is contained in:
parent
c79bda6e4f
commit
5dd5174722
@ -1002,6 +1002,7 @@ testbuild.sh
|
|||||||
Default $WD/../nuttx, where $WD is the parent directory of
|
Default $WD/../nuttx, where $WD is the parent directory of
|
||||||
the directory where this script is.
|
the directory where this script is.
|
||||||
-p only print the list of configs without running any builds
|
-p only print the list of configs without running any builds
|
||||||
|
-C Skip tree cleanness check.
|
||||||
-G Use "git clean -xfdq" instead of "make distclean" to clean the tree.
|
-G Use "git clean -xfdq" instead of "make distclean" to clean the tree.
|
||||||
This option may speed up the builds. However, note that:
|
This option may speed up the builds. However, note that:
|
||||||
* This assumes that your trees are git based.
|
* This assumes that your trees are git based.
|
||||||
|
@ -50,6 +50,7 @@ unset JOPTION
|
|||||||
PRINTLISTONLY=0
|
PRINTLISTONLY=0
|
||||||
GITCLEAN=0
|
GITCLEAN=0
|
||||||
SAVEARTIFACTS=0
|
SAVEARTIFACTS=0
|
||||||
|
CHECKCLEAN=1
|
||||||
|
|
||||||
case $(uname -s) in
|
case $(uname -s) in
|
||||||
Darwin*)
|
Darwin*)
|
||||||
@ -84,6 +85,7 @@ function showusage {
|
|||||||
echo " -t <topdir> provides the absolute path to top nuttx/ directory. Default ../nuttx"
|
echo " -t <topdir> provides the absolute path to top nuttx/ directory. Default ../nuttx"
|
||||||
echo " -p only print the list of configs without running any builds"
|
echo " -p only print the list of configs without running any builds"
|
||||||
echo " -A store the build executable artifact in ARTIFACTDIR (defaults to ../buildartifacts"
|
echo " -A store the build executable artifact in ARTIFACTDIR (defaults to ../buildartifacts"
|
||||||
|
echo " -C Skip tree cleanness check."
|
||||||
echo " -G Use \"git clean -xfdq\" instead of \"make distclean\" to clean the tree."
|
echo " -G Use \"git clean -xfdq\" instead of \"make distclean\" to clean the tree."
|
||||||
echo " This option may speed up the builds. However, note that:"
|
echo " This option may speed up the builds. However, note that:"
|
||||||
echo " * This assumes that your trees are git based."
|
echo " * This assumes that your trees are git based."
|
||||||
@ -138,6 +140,9 @@ while [ ! -z "$1" ]; do
|
|||||||
-A )
|
-A )
|
||||||
SAVEARTIFACTS=1
|
SAVEARTIFACTS=1
|
||||||
;;
|
;;
|
||||||
|
-C )
|
||||||
|
CHECKCLEAN=0
|
||||||
|
;;
|
||||||
-h )
|
-h )
|
||||||
showusage
|
showusage
|
||||||
;;
|
;;
|
||||||
@ -208,6 +213,7 @@ function distclean {
|
|||||||
|
|
||||||
# Ensure nuttx and apps directory in clean state even with --ignored
|
# Ensure nuttx and apps directory in clean state even with --ignored
|
||||||
|
|
||||||
|
if [ ${CHECKCLEAN} -ne 0 ]; then
|
||||||
if [ -d $nuttx/.git ] || [ -d $APPSDIR/.git ]; then
|
if [ -d $nuttx/.git ] || [ -d $APPSDIR/.git ]; then
|
||||||
if [[ -n $(git -C $nuttx status --ignored -s) ]]; then
|
if [[ -n $(git -C $nuttx status --ignored -s) ]]; then
|
||||||
git -C $nuttx status --ignored
|
git -C $nuttx status --ignored
|
||||||
@ -220,6 +226,7 @@ function distclean {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
return $fail
|
return $fail
|
||||||
}
|
}
|
||||||
@ -269,6 +276,7 @@ function build {
|
|||||||
|
|
||||||
# Ensure nuttx and apps directory in clean state
|
# Ensure nuttx and apps directory in clean state
|
||||||
|
|
||||||
|
if [ ${CHECKCLEAN} -ne 0 ]; then
|
||||||
if [ -d $nuttx/.git ] || [ -d $APPSDIR/.git ]; then
|
if [ -d $nuttx/.git ] || [ -d $APPSDIR/.git ]; then
|
||||||
if [[ -n $(git -C $nuttx status -s) ]]; then
|
if [[ -n $(git -C $nuttx status -s) ]]; then
|
||||||
git -C $nuttx status
|
git -C $nuttx status
|
||||||
@ -279,6 +287,7 @@ function build {
|
|||||||
fail=1
|
fail=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
return $fail
|
return $fail
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user