mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:16:00 +08:00
tools/testbuild.sh: Support regular expression in blacklist
and prepend 'uname -s' to config for filtering config by host Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Brennan Ashton
parent
079737dd0c
commit
7901ad6959
+4
-1
@@ -1040,7 +1040,10 @@ testbuild.sh
|
|||||||
configured board.
|
configured board.
|
||||||
|
|
||||||
The prefix '-' can be used to skip a configuration:
|
The prefix '-' can be used to skip a configuration:
|
||||||
-stm32f429i-disco/nsh,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
|
-stm32f429i-disco/nsh
|
||||||
|
|
||||||
|
or skip a configuration on a specific host(e.g. Darwin):
|
||||||
|
-Darwin,sim:rpserver
|
||||||
|
|
||||||
uncrustify.cfg
|
uncrustify.cfg
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
+62
-41
@@ -47,6 +47,23 @@ unset JOPTION
|
|||||||
PRINTLISTONLY=0
|
PRINTLISTONLY=0
|
||||||
GITCLEAN=0
|
GITCLEAN=0
|
||||||
|
|
||||||
|
case $(uname -s) in
|
||||||
|
Darwin*)
|
||||||
|
HOST=Darwin
|
||||||
|
;;
|
||||||
|
CYGWIN*)
|
||||||
|
HOST=Cygwin
|
||||||
|
;;
|
||||||
|
MINGW32*)
|
||||||
|
HOST=MinGw
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
|
||||||
|
# Assume linux as a fallback
|
||||||
|
HOST=Linux
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
function showusage {
|
function showusage {
|
||||||
echo ""
|
echo ""
|
||||||
echo "USAGE: $progname [-l|m|c|g|n] [-d] [-e <extraflags>] [-x] [-j <ncpus>] [-a <appsdir>] [-t <topdir>] [-p] [-G] <testlist-file>"
|
echo "USAGE: $progname [-l|m|c|g|n] [-d] [-e <extraflags>] [-x] [-j <ncpus>] [-a <appsdir>] [-t <topdir>] [-p] [-G] <testlist-file>"
|
||||||
@@ -258,51 +275,55 @@ function build {
|
|||||||
function dotest {
|
function dotest {
|
||||||
echo "===================================================================================="
|
echo "===================================================================================="
|
||||||
config=`echo $1 | cut -d',' -f1`
|
config=`echo $1 | cut -d',' -f1`
|
||||||
re="-${config/\//:}[[:space:]]"
|
check=${HOST},${config/\//:}
|
||||||
if [[ "${blacklist} " =~ $re ]]; then
|
|
||||||
echo "Skipping: $1"
|
for re in $blacklist; do
|
||||||
else
|
if [[ "${check}" =~ ${re:1}$ ]]; then
|
||||||
echo "Configuration/Tool: $1"
|
echo "Skipping: $1"
|
||||||
if [ ${PRINTLISTONLY} -eq 1 ]; then
|
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Parse the next line
|
echo "Configuration/Tool: $1"
|
||||||
|
if [ ${PRINTLISTONLY} -eq 1 ]; then
|
||||||
configdir=`echo $config | cut -s -d':' -f2`
|
return
|
||||||
if [ -z "${configdir}" ]; then
|
|
||||||
configdir=`echo $config | cut -s -d'/' -f2`
|
|
||||||
if [ -z "${configdir}" ]; then
|
|
||||||
echo "ERROR: Malformed configuration: ${config}"
|
|
||||||
showusage
|
|
||||||
else
|
|
||||||
boarddir=`echo $config | cut -d'/' -f1`
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
boarddir=`echo $config | cut -d':' -f1`
|
|
||||||
fi
|
|
||||||
|
|
||||||
path=$nuttx/boards/*/*/$boarddir/configs/$configdir
|
|
||||||
if [ ! -r $path/defconfig ]; then
|
|
||||||
echo "ERROR: no configuration found at $path"
|
|
||||||
showusage
|
|
||||||
fi
|
|
||||||
|
|
||||||
unset toolchain
|
|
||||||
if [ "X$config" != "X$1" ]; then
|
|
||||||
toolchain=`echo $1 | cut -d',' -f2`
|
|
||||||
if [ -z "$toolchain" ]; then
|
|
||||||
echo " Warning: no tool configuration"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Perform the build test
|
|
||||||
|
|
||||||
echo "------------------------------------------------------------------------------------"
|
|
||||||
distclean
|
|
||||||
configure
|
|
||||||
build
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Parse the next line
|
||||||
|
|
||||||
|
configdir=`echo $config | cut -s -d':' -f2`
|
||||||
|
if [ -z "${configdir}" ]; then
|
||||||
|
configdir=`echo $config | cut -s -d'/' -f2`
|
||||||
|
if [ -z "${configdir}" ]; then
|
||||||
|
echo "ERROR: Malformed configuration: ${config}"
|
||||||
|
showusage
|
||||||
|
else
|
||||||
|
boarddir=`echo $config | cut -d'/' -f1`
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
boarddir=`echo $config | cut -d':' -f1`
|
||||||
|
fi
|
||||||
|
|
||||||
|
path=$nuttx/boards/*/*/$boarddir/configs/$configdir
|
||||||
|
if [ ! -r $path/defconfig ]; then
|
||||||
|
echo "ERROR: no configuration found at $path"
|
||||||
|
showusage
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset toolchain
|
||||||
|
if [ "X$config" != "X$1" ]; then
|
||||||
|
toolchain=`echo $1 | cut -d',' -f2`
|
||||||
|
if [ -z "$toolchain" ]; then
|
||||||
|
echo " Warning: no tool configuration"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Perform the build test
|
||||||
|
|
||||||
|
echo "------------------------------------------------------------------------------------"
|
||||||
|
distclean
|
||||||
|
configure
|
||||||
|
build
|
||||||
}
|
}
|
||||||
|
|
||||||
# Perform the build test for each entry in the test list file
|
# Perform the build test for each entry in the test list file
|
||||||
|
|||||||
Reference in New Issue
Block a user