diff --git a/tools/README.txt b/tools/README.txt index 2ea7daf9fb..329de09703 100644 --- a/tools/README.txt +++ b/tools/README.txt @@ -1040,7 +1040,10 @@ testbuild.sh configured board. 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 -------------- diff --git a/tools/testbuild.sh b/tools/testbuild.sh index afc27bc40c..b974e987f7 100755 --- a/tools/testbuild.sh +++ b/tools/testbuild.sh @@ -47,6 +47,23 @@ unset JOPTION PRINTLISTONLY=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 { echo "" echo "USAGE: $progname [-l|m|c|g|n] [-d] [-e ] [-x] [-j ] [-a ] [-t ] [-p] [-G] " @@ -258,51 +275,55 @@ function build { function dotest { echo "====================================================================================" config=`echo $1 | cut -d',' -f1` - re="-${config/\//:}[[:space:]]" - if [[ "${blacklist} " =~ $re ]]; then - echo "Skipping: $1" - else - echo "Configuration/Tool: $1" - if [ ${PRINTLISTONLY} -eq 1 ]; then + check=${HOST},${config/\//:} + + for re in $blacklist; do + if [[ "${check}" =~ ${re:1}$ ]]; then + echo "Skipping: $1" return fi + done - # 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 + echo "Configuration/Tool: $1" + if [ ${PRINTLISTONLY} -eq 1 ]; then + return 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