[tests] change 1.2 builds to 1.3 (#7756)

This commit is contained in:
Jonathan Hui
2022-06-08 11:44:23 -07:00
committed by GitHub
parent 9e887eb77a
commit 0c48ade2ff
21 changed files with 111 additions and 101 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ build_cc2538()
"DNS_CLIENT=1"
"JOINER=1"
"SLAAC=1"
# cc2538 does not have enough resources to support Thread 1.2
# cc2538 does not have enough resources to support Thread 1.3
"THREAD_VERSION=1.1"
)
+1 -1
View File
@@ -51,7 +51,7 @@ reset_source()
build_cc2538()
{
local options=(
# cc2538 does not have enough resources to support Thread 1.2
# cc2538 does not have enough resources to support Thread 1.3
"-DOT_THREAD_VERSION=1.1"
)
+2 -2
View File
@@ -43,10 +43,10 @@ main()
ninja -C gn-out
test -f gn-out/obj/src/core/libopenthread-ftd.a
# Check GN build for OT1.2
# Check GN build for OT1.3
rm gn-out -r || true
mkdir gn-out
echo 'openthread_config_thread_version = "1.2"' >gn-out/args.gn
echo 'openthread_config_thread_version = "1.3"' >gn-out/args.gn
gn gen --check gn-out
gn args gn-out --list
ninja -C gn-out
+7 -7
View File
@@ -93,7 +93,7 @@ build_all_features()
"-DOPENTHREAD_CONFIG_MAC_OUTGOING_BEACON_PAYLOAD_ENABLE=1"
)
local options_1_2=(
local options_1_3=(
"-DOPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=1"
"-DOPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1"
"-DOPENTHREAD_CONFIG_DUA_ENABLE=1"
@@ -110,15 +110,15 @@ build_all_features()
reset_source
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_OUTPUT=OT_LOG_OUTPUT_NONE"
# Build Thread 1.3 with full features and logs
export CPPFLAGS="${options[*]} ${options_1_3[*]} -DOPENTHREAD_CONFIG_LOG_OUTPUT=OT_LOG_OUTPUT_NONE"
reset_source
make -f examples/Makefile-simulation THREAD_VERSION=1.2
make -f examples/Makefile-simulation THREAD_VERSION=1.3
# Build Thread 1.2 with full features and full logs
export CPPFLAGS="${options[*]} ${options_1_2[*]}"
# Build Thread 1.3 with full features and full logs
export CPPFLAGS="${options[*]} ${options_1_3[*]}"
reset_source
make -f examples/Makefile-simulation THREAD_VERSION=1.2 FULL_LOGS=1
make -f examples/Makefile-simulation THREAD_VERSION=1.3 FULL_LOGS=1
# Build Thread 1.1 with ASSERT disabled
export CPPFLAGS="${options[*]} -DOPENTHREAD_CONFIG_ASSERT_ENABLE=0"
+8 -8
View File
@@ -53,7 +53,7 @@ build_all_features()
-DOT_FTD=OFF \
-DOT_MTD=OFF
# Thread 1.2 options
# Thread 1.3 options
local options=(
"-DOT_BACKBONE_ROUTER=ON"
"-DOT_BORDER_ROUTING=ON"
@@ -61,18 +61,18 @@ build_all_features()
"-DOT_MLR=ON"
"-DOT_OTNS=ON"
"-DOT_SIMULATION_VIRTUAL_TIME=ON"
"-DOT_THREAD_VERSION=1.2"
"-DOT_THREAD_VERSION=1.3"
)
# Build Thread 1.2 with full features
# Build Thread 1.3 with full features
reset_source
"$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON
# Build Thread 1.2 Backbone Router without DUA ND Proxying
# Build Thread 1.3 Backbone Router without DUA ND Proxying
reset_source
"$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_BACKBONE_ROUTER_DUA_NDPROXYING=OFF
# Build Thread 1.2 Backbone Router without Multicast Routing
# Build Thread 1.3 Backbone Router without Multicast Routing
reset_source
"$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_BACKBONE_ROUTER_MULTICAST_ROUTING=OFF
@@ -82,11 +82,11 @@ build_all_features()
-DOT_THREAD_VERSION=1.1 \
-DOT_VENDOR_EXTENSION=../../src/core/common/extension_example.cpp
# Build Thread 1.2 with no additional features
# Build Thread 1.3 with no additional features
reset_source
"$(dirname "$0")"/cmake-build simulation -DOT_THREAD_VERSION=1.2
"$(dirname "$0")"/cmake-build simulation -DOT_THREAD_VERSION=1.3
# Build Thread 1.2 with full features and OT_ASSERT=OFF
# Build Thread 1.3 with full features and OT_ASSERT=OFF
reset_source
"$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON -DOT_ASSERT=OFF
+3 -3
View File
@@ -151,9 +151,9 @@ size_nrf52840_version()
local thread_version=$1
if [[ ${thread_version} == "1.2" ]]; then
if [[ ${thread_version} != "1.1" ]]; then
options+=(
"-DOT_THREAD_VERSION=1.2"
"-DOT_THREAD_VERSION=1.3"
"-DOT_BACKBONE_ROUTER=ON"
"-DOT_DUA=ON"
"-DOT_MLR=ON"
@@ -243,7 +243,7 @@ size_nrf52840()
"${reporter}" init OpenThread
size_nrf52840_version 1.1
size_nrf52840_version 1.2
size_nrf52840_version 1.3
"${reporter}" post
}
+3 -3
View File
@@ -121,7 +121,7 @@ readonly OT_CLANG_TIDY_BUILD_OPTS=(
'-DOT_SNTP_CLIENT=ON'
'-DOT_SRP_CLIENT=ON'
'-DOT_SRP_SERVER=ON'
'-DOT_THREAD_VERSION=1.2'
'-DOT_THREAD_VERSION=1.3'
'-DOT_TREL=ON'
'-DOT_COVERAGE=ON'
'-DOT_LOG_LEVEL_DYNAMIC=ON'
@@ -177,7 +177,7 @@ do_clang_tidy_fix()
(mkdir -p ./build/cmake-tidy \
&& cd ./build/cmake-tidy \
&& THREAD_VERSION=1.2 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \
&& THREAD_VERSION=1.3 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \
&& ../../script/clang-tidy -header-filter='.*' -checks="${OT_CLANG_TIDY_CHECKS}" -j"$OT_BUILD_JOBS" "${OT_CLANG_TIDY_FIX_DIRS[@]}" -fix)
}
@@ -190,7 +190,7 @@ do_clang_tidy_check()
(
mkdir -p ./build/cmake-tidy \
&& cd ./build/cmake-tidy \
&& THREAD_VERSION=1.2 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \
&& THREAD_VERSION=1.3 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \
&& ../../script/clang-tidy -header-filter='.*' -checks="${OT_CLANG_TIDY_CHECKS}" -j"$OT_BUILD_JOBS" "${OT_CLANG_TIDY_FIX_DIRS[@]}" \
| grep -v -E "third_party" >output.txt
if grep -q "warning: \|error: " output.txt; then
+21 -21
View File
@@ -42,7 +42,7 @@ readonly OT_COLOR_NONE='\033[0m'
readonly OT_NODE_TYPE="${OT_NODE_TYPE:-cli}"
readonly OT_NATIVE_IP="${OT_NATIVE_IP:-0}"
readonly THREAD_VERSION="${THREAD_VERSION:-1.2}"
readonly THREAD_VERSION="${THREAD_VERSION:-1.3}"
readonly INTER_OP="${INTER_OP:-0}"
readonly VERBOSE="${VERBOSE:-0}"
readonly BORDER_ROUTING="${BORDER_ROUTING:-1}"
@@ -81,7 +81,7 @@ build_simulation()
options+=("-DOT_FULL_LOGS=ON")
fi
if [[ ${version} == "1.2" ]]; then
if [[ ${version} != "1.1" ]]; then
options+=("-DOT_DUA=ON")
options+=("-DOT_MLR=ON")
fi
@@ -90,7 +90,7 @@ build_simulation()
options+=("-DOT_SIMULATION_VIRTUAL_TIME=ON")
fi
if [[ ${version} == "1.2" ]]; then
if [[ ${version} != "1.1" ]]; then
options+=("-DOT_CSL_RECEIVER=ON")
options+=("-DOT_LINK_METRICS_INITIATOR=ON")
options+=("-DOT_LINK_METRICS_SUBJECT=ON")
@@ -106,7 +106,7 @@ build_simulation()
OT_CMAKE_NINJA_TARGET=ot-rcp OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}" "${OT_SRCDIR}"/script/cmake-build simulation "${options[@]}" "-DOT_SIMULATION_VIRTUAL_TIME_UART=ON"
fi
if [[ ${version} == "1.2" && ${INTER_OP_BBR} == 1 ]]; then
if [[ ${version} != "1.1" && ${INTER_OP_BBR} == 1 ]]; then
options+=("-DOT_BACKBONE_ROUTER=ON")
@@ -124,7 +124,7 @@ build_posix()
local version="$1"
local options=("-DOT_MESSAGE_USE_HEAP=ON" "-DOT_THREAD_VERSION=${version}" "-DBUILD_TESTING=ON")
if [[ ${version} == "1.2" ]]; then
if [[ ${version} != "1.1" ]]; then
options+=("-DOT_DUA=ON")
options+=("-DOT_MLR=ON")
fi
@@ -147,7 +147,7 @@ build_posix()
OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-posix-${version}" "${OT_SRCDIR}"/script/cmake-build posix "${options[@]}"
if [[ ${version} == "1.2" && ${INTER_OP_BBR} == 1 ]]; then
if [[ ${version} != "1.1" && ${INTER_OP_BBR} == 1 ]]; then
options+=("-DOT_BACKBONE_ROUTER=ON")
@@ -170,7 +170,7 @@ do_build()
{
build_for_one_version "${THREAD_VERSION}"
if [[ ${THREAD_VERSION} == "1.2" && ${INTER_OP} == "1" ]]; then
if [[ ${THREAD_VERSION} != "1.1" && ${INTER_OP} == "1" ]]; then
build_for_one_version 1.1
fi
}
@@ -201,8 +201,8 @@ do_unit()
{
do_unit_version "${THREAD_VERSION}"
if [[ ${THREAD_VERSION} == "1.2" && ${INTER_OP_BBR} == 1 ]]; then
do_unit_version "1.2-bbr"
if [[ ${THREAD_VERSION} != "1.1" && ${INTER_OP_BBR} == 1 ]]; then
do_unit_version "1.3-bbr"
fi
}
@@ -220,8 +220,8 @@ do_cert()
;;
esac
if [[ ${THREAD_VERSION} == "1.2" ]]; then
export top_builddir_1_2_bbr="${OT_BUILDDIR}/openthread-simulation-1.2-bbr"
if [[ ${THREAD_VERSION} != "1.1" ]]; then
export top_builddir_1_3_bbr="${OT_BUILDDIR}/openthread-simulation-1.3-bbr"
if [[ ${INTER_OP} == "1" ]]; then
export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
fi
@@ -238,8 +238,8 @@ do_cert_suite()
{
export top_builddir="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}"
if [[ ${THREAD_VERSION} == "1.2" ]]; then
export top_builddir_1_2_bbr="${OT_BUILDDIR}/openthread-simulation-1.2-bbr"
if [[ ${THREAD_VERSION} != "1.1" ]]; then
export top_builddir_1_3_bbr="${OT_BUILDDIR}/openthread-simulation-1.3-bbr"
if [[ ${INTER_OP} == "1" ]]; then
export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
fi
@@ -386,7 +386,7 @@ do_expect()
test_patterns=(-name 'tun-*.exp')
else
test_patterns=(-name 'posix-*.exp' -o -name 'cli-*.exp')
if [[ ${THREAD_VERSION} == "1.2" ]]; then
if [[ ${THREAD_VERSION} != "1.1" ]]; then
test_patterns+=(-o -name 'v1_2-*.exp')
fi
fi
@@ -421,9 +421,9 @@ ENVIRONMENTS:
VERBOSE 1 to build or test verbosely. The default is 0.
VIRTUAL_TIME 1 for virtual time, otherwise real time. The default value is 0 when running expect tests,
otherwise default value is 1.
THREAD_VERSION 1.1 for Thread 1.1 stack, 1.2 for Thread 1.2 stack. The default is 1.2.
INTER_OP 1 to build 1.1 together. Only works when THREAD_VERSION is 1.2. The default is 0.
INTER_OP_BBR 1 to build bbr version together. Only works when THREAD_VERSION is 1.2. The default is 1.
THREAD_VERSION 1.1 for Thread 1.1 stack, 1.3 for Thread 1.3 stack. The default is 1.3.
INTER_OP 1 to build 1.1 together. Only works when THREAD_VERSION is 1.3. The default is 0.
INTER_OP_BBR 1 to build bbr version together. Only works when THREAD_VERSION is 1.3. The default is 1.
COMMANDS:
clean Clean built files to prepare for new build.
@@ -455,7 +455,7 @@ EXAMPLES:
THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
# Test Thread 1.2 with real time, use 'INTER_OP=1' when the case needs both versions.
# Test Thread 1.3 with real time, use 'INTER_OP=1' when the case needs both versions.
VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_test_enhanced_keep_alive.py
INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_router_5_1_1.py
INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert_suite tests/scripts/thread-cert/v1_2_*
@@ -559,10 +559,10 @@ envsetup()
export RADIO_DEVICE="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}/examples/apps/ncp/ot-rcp"
export OT_CLI_PATH="${OT_BUILDDIR}/openthread-posix-${THREAD_VERSION}/src/posix/ot-cli"
if [[ ${THREAD_VERSION} == "1.2" ]]; then
if [[ ${THREAD_VERSION} != "1.1" ]]; then
export RADIO_DEVICE_1_1="${OT_BUILDDIR}/openthread-simulation-1.1/examples/apps/ncp/ot-rcp"
export OT_CLI_PATH_1_1="${OT_BUILDDIR}/openthread-posix-1.1/src/posix/ot-cli"
export OT_CLI_PATH_1_2_BBR="${OT_BUILDDIR}/openthread-posix-1.2-bbr/src/posix/ot-cli"
export OT_CLI_PATH_BBR="${OT_BUILDDIR}/openthread-posix-1.3-bbr/src/posix/ot-cli"
fi
fi
@@ -606,7 +606,7 @@ main()
fi
[[ ${VIRTUAL_TIME} == 1 ]] && echo "Using virtual time" || echo "Using real time"
[[ ${THREAD_VERSION} == "1.2" ]] && echo "Using Thread 1.2 stack" || echo "Using Thread 1.1 stack"
[[ ${THREAD_VERSION} != "1.1" ]] && echo "Using Thread 1.3 stack" || echo "Using Thread 1.1 stack"
while [[ $# != 0 ]]; do
case "$1" in