This is an automated email from the ASF dual-hosted git repository.
raiden00 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 99c29bda70 tools/testbuild: restore the original toolchain
configuration before refresh
99c29bda70 is described below
commit 99c29bda7094df5b0a790eb1d0a7a7cf89b7da39
Author: chao an <[email protected]>
AuthorDate: Thu Jul 20 10:41:42 2023 +0800
tools/testbuild: restore the original toolchain configuration before refresh
Signed-off-by: chao an <[email protected]>
---
tools/testbuild.sh | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/tools/testbuild.sh b/tools/testbuild.sh
index 4e64396075..17a5bab697 100755
--- a/tools/testbuild.sh
+++ b/tools/testbuild.sh
@@ -310,10 +310,10 @@ function configure_default {
if [ "X$toolchain" != "X" ]; then
setting=`grep _TOOLCHAIN_ $nuttx/.config | grep -v CONFIG_ARCH_TOOLCHAIN_*
| grep =y`
- varname=`echo $setting | cut -d'=' -f1`
- if [ ! -z "$varname" ]; then
- echo " Disabling $varname"
- kconfig-tweak --file $nuttx/.config -d $varname
+ original_toolchain=`echo $setting | cut -d'=' -f1`
+ if [ ! -z "$original_toolchain" ]; then
+ echo " Disabling $original_toolchain"
+ kconfig-tweak --file $nuttx/.config -d $original_toolchain
fi
echo " Enabling $toolchain"
@@ -333,10 +333,10 @@ function configure_cmake {
if [ "X$toolchain" != "X" ]; then
setting=`grep _TOOLCHAIN_ $nuttx/build/.config | grep -v
CONFIG_ARCH_TOOLCHAIN_* | grep =y`
- varname=`echo $setting | cut -d'=' -f1`
- if [ ! -z "$varname" ]; then
- echo " Disabling $varname"
- kconfig-tweak --file $nuttx/build/.config -d $varname
+ original_toolchain=`echo $setting | cut -d'=' -f1`
+ if [ ! -z "$original_toolchain" ]; then
+ echo " Disabling $original_toolchain"
+ kconfig-tweak --file $nuttx/build/.config -d $original_toolchain
fi
echo " Enabling $toolchain"
@@ -419,6 +419,14 @@ function refresh_default {
function refresh_cmake {
# Ensure defconfig in the canonical form
+ if [ "X$toolchain" != "X" ]; then
+ if [ ! -z "$original_toolchain" ]; then
+ kconfig-tweak --file $nuttx/build/.config -e $original_toolchain
+ fi
+
+ kconfig-tweak --file $nuttx/build/.config -d $toolchain
+ fi
+
if ! cmake --build build -t savedefconfig 1>/dev/null; then
cmake --build build -t savedefconfig
fail=1
@@ -521,6 +529,7 @@ function dotest {
fi
unset toolchain
+ unset original_toolchain
if [ "X$config" != "X$1" ]; then
toolchain=`echo $1 | cut -d',' -f2`
if [ -z "$toolchain" ]; then