From fc0c775b6f0720a7e60e40a33f2ed7857ab98366 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 29 Nov 2015 14:42:32 -0600 Subject: [PATCH] Extended tools/testbuild.sh to work with simulator builds which have no toolchain definition --- tools/testbuild.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/tools/testbuild.sh b/tools/testbuild.sh index a441196e81..65d8e10f93 100755 --- a/tools/testbuild.sh +++ b/tools/testbuild.sh @@ -173,15 +173,17 @@ function configure { kconfig-tweak --file $nuttx/.config --disable CONFIG_CXX_NEWLONG fi - setting=`grep TOOLCHAIN $nuttx/.config | grep =y` - varname=`echo $setting | cut -d'=' -f1` - if [ ! -z "varname" ]; then - echo " Disabling $varname" - kconfig-tweak --file $nuttx/.config --disable $varname - fi + if [ "X$toolchain" != "X" ]; then + setting=`grep TOOLCHAIN $nuttx/.config | grep =y` + varname=`echo $setting | cut -d'=' -f1` + if [ ! -z "varname" ]; then + echo " Disabling $varname" + kconfig-tweak --file $nuttx/.config --disable $varname + fi - echo " Enabling $toolchain" - kconfig-tweak --file $nuttx/.config --enable $toolchain + echo " Enabling $toolchain" + kconfig-tweak --file $nuttx/.config --enable $toolchain + fi echo " Refreshing..." kconfig-conf --olddefconfig Kconfig 1>/dev/null @@ -232,10 +234,12 @@ for line in $testlist; do showusage fi - toolchain=`echo $line | cut -d',' -f2` - if [ -z "$toolchain" ]; then - echo "ERROR no tool configuration" - showusage + unset toolchain; + if [ "X$config" != "X$line" ]; then + toolchain=`echo $line | cut -d',' -f2` + if [ -z "$toolchain" ]; then + echo " Warning: no tool configuration" + fi fi # Perform the build test