From 3d45d0a58beb1472e52a74de7022a647f7097354 Mon Sep 17 00:00:00 2001 From: Li Cao Date: Thu, 8 Jul 2021 03:31:31 +0800 Subject: [PATCH] [script] fix Thread version for check-simulation-build (#6781) The default Thread version has been set to 1.2 when building. Our test script which checks building hasn't been updated accordingly. This commit fixes this error. --- script/check-simulation-build-autotools | 17 ++++++++++++----- script/check-simulation-build-cmake | 4 ++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/script/check-simulation-build-autotools b/script/check-simulation-build-autotools index ec71578d8..0f7fbc9eb 100755 --- a/script/check-simulation-build-autotools +++ b/script/check-simulation-build-autotools @@ -94,32 +94,39 @@ build_all_features() "-DOPENTHREAD_CONFIG_MLR_ENABLE=1" ) + # Build Thread 1.1 with full features and no log export CPPFLAGS="${options[*]} -DOPENTHREAD_CONFIG_LOG_LEVEL=OT_LOG_LEVEL_NONE" reset_source - make -f examples/Makefile-simulation + make -f examples/Makefile-simulation THREAD_VERSION=1.1 + # Build Thread 1.1 with full features and full logs export CPPFLAGS="${options[*]}" reset_source - make -f examples/Makefile-simulation FULL_LOGS=1 + make -f examples/Makefile-simulation THREAD_VERSION=1.1 FULL_LOGS=1 + # Build Thread 1.1 with full features and full logs (Logs defined as macros) export CPPFLAGS="${options[*]} -DOPENTHREAD_CONFIG_LOG_DEFINE_AS_MACRO_ONLY=1" - make -f examples/Makefile-simulation FULL_LOGS=1 + make -f examples/Makefile-simulation THREAD_VERSION=1.1 FULL_LOGS=1 + # Build Thread 1.2 with full features and logs export CPPFLAGS="${options[*]} ${options_1_2[*]} -DOPENTHREAD_CONFIG_LOG_LEVEL=OT_LOG_LEVEL_NONE" reset_source make -f examples/Makefile-simulation THREAD_VERSION=1.2 + # Build Thread 1.2 with full features and full logs export CPPFLAGS="${options[*]} ${options_1_2[*]}" reset_source make -f examples/Makefile-simulation THREAD_VERSION=1.2 FULL_LOGS=1 + # Build Thread 1.1 with ASSERT disabled export CPPFLAGS="${options[*]} -DOPENTHREAD_CONFIG_ASSERT_ENABLE=0" reset_source - make -f examples/Makefile-simulation + make -f examples/Makefile-simulation THREAD_VERSION=1.1 + # Build Thread 1.1 OTNS export CPPFLAGS="${options[*]}" reset_source - make -f examples/Makefile-simulation OTNS=1 + make -f examples/Makefile-simulation THREAD_VERSION=1.1 OTNS=1 } build_nest_common() diff --git a/script/check-simulation-build-cmake b/script/check-simulation-build-cmake index cba7d8509..c0597773b 100755 --- a/script/check-simulation-build-cmake +++ b/script/check-simulation-build-cmake @@ -40,7 +40,7 @@ build_all_features() { # Build Thread 1.1 with full features reset_source - "$(dirname "$0")"/cmake-build simulation + "$(dirname "$0")"/cmake-build simulation -DOT_THREAD_VERSION=1.1 # Build Thread 1.2 with full features reset_source @@ -56,7 +56,7 @@ build_all_features() # Build with Vendor Extension reset_source - "$(dirname "$0")"/cmake-build simulation -DOT_VENDOR_EXTENSION=../../src/core/common/extension_example.cpp + "$(dirname "$0")"/cmake-build simulation -DOT_THREAD_VERSION=1.1 -DOT_VENDOR_EXTENSION=../../src/core/common/extension_example.cpp # Build Thread 1.2 with no additional features reset_source