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

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new c4efab7eea tools/testbuild.sh: added store compilation artifacts for 
cmake
c4efab7eea is described below

commit c4efab7eea479e0477e79de75f2e083a1dec2bc1
Author: simbit18 <101105604+simbi...@users.noreply.github.com>
AuthorDate: Tue Jul 30 12:09:23 2024 +0200

    tools/testbuild.sh: added store compilation artifacts for cmake
    
    Added the ability to store compilation artifacts for cmake after a job.
---
 tools/testbuild.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tools/testbuild.sh b/tools/testbuild.sh
index 65ab2aed19..e4cfbe8861 100755
--- a/tools/testbuild.sh
+++ b/tools/testbuild.sh
@@ -195,7 +195,7 @@ fi
 cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; }
 
 function exportandimport {
-  # Do nothing until we finish to build the nuttx
+  # Do nothing until we finish to build the nuttx.
   if [ ! -f nuttx ]; then
     return $fail
   fi
@@ -387,6 +387,14 @@ function build_cmake {
     fail=1
   fi
 
+  if [ ${SAVEARTIFACTS} -eq 1 ]; then
+    artifactconfigdir=$ARTIFACTDIR/$(echo $config | sed "s/:/\//")/
+    mkdir -p $artifactconfigdir
+    cd $nuttx/build
+    xargs -I "{}" cp "{}" $artifactconfigdir < $nuttx/build/nuttx.manifest
+    cd $nuttx
+  fi
+
   return $fail
 }
 

Reply via email to