You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/01/23 13:30:03 UTC

[incubator-nuttx] branch pr150 updated: tools/testbuild.sh: use fail to record build result

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch pr150
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/pr150 by this push:
     new c09071f  tools/testbuild.sh: use fail to record build result
c09071f is described below

commit c09071ffe8aff8aa58b511ea592dc925b9428851
Author: liuhaitao <li...@xiaomi.com>
AuthorDate: Tue Jan 21 17:53:06 2020 +0800

    tools/testbuild.sh: use fail to record build result
    
    CI should know the build status of testbuild.sh, so use -k make flag option as default
    instead of -i ignore-error option. Then use fail to record build result. In addition,
    refresh .config if toolchain updated.
    
    Change-Id: I182c2b2db489e6ccb0a79fdc664072d19974c3ca
    Signed-off-by: liuhaitao <li...@xiaomi.com>
---
 tools/testbuild.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tools/testbuild.sh b/tools/testbuild.sh
index a009fc0..58f5dde 100755
--- a/tools/testbuild.sh
+++ b/tools/testbuild.sh
@@ -36,8 +36,9 @@ WD=$PWD
 nuttx=$WD/../nuttx
 
 progname=$0
+fail=0
 APPSDIR=../apps
-MAKE_FLAGS=-i
+MAKE_FLAGS=-k
 MAKE=make
 unset testfile
 unset HOPTION
@@ -140,7 +141,7 @@ cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; }
 function distclean {
   if [ -f .config ]; then
     echo "  Cleaning..."
-    ${MAKE} ${JOPTION} ${MAKE_FLAGS} distclean 1>/dev/null
+    ${MAKE} ${JOPTION} ${MAKE_FLAGS} distclean 1>/dev/null || fail=1
   fi
 }
 
@@ -160,6 +161,9 @@ function configure {
 
     echo "  Enabling $toolchain"
     echo "$toolchain=y" >> $nuttx/.config
+
+    echo "  Refreshing..."
+    ${MAKE} ${MAKE_FLAGS} olddefconfig 1>/dev/null || fail=1
   fi
 }
 
@@ -168,7 +172,7 @@ function configure {
 function build {
   echo "  Building NuttX..."
   echo "------------------------------------------------------------------------------------"
-  ${MAKE} ${JOPTION} ${MAKE_FLAGS} 1>/dev/null
+  ${MAKE} ${JOPTION} ${MAKE_FLAGS} 1>/dev/null || fail=1
 }
 
 # Coordinate the steps for the next build test
@@ -236,3 +240,5 @@ for line in $testlist; do
 done
 
 echo "===================================================================================="
+
+exit $fail