mirror of
https://github.com/espressif/openthread.git
synced 2026-11-12 01:11:11 +00:00
[ci] reduce workflow job runtimes to under 30 minutes (#13761)
Several GitHub Actions jobs (`Build` `gcc-*`/`clang-*`/`macos-*`, `POSIX` `expects-linux`, `Simulation` `expects`, `OTNS` `Stress connectivity`, and `CIFuzz`) previously serially executed dozens of clean CMake builds or real-time `expect`/stress/fuzz tests in a single job, taking 30 to 75 minutes and slowing down PR turnaround. This commit splits those serial build and test steps into parallel jobs and tunes stress/fuzz durations so individual jobs average under 30 minutes without dropping any build configurations or test cases: - `build.yml` + `script/check-simulation-build*` + `script/check-posix-build`: Split simulation CMake builds into two balanced groups (`1.1` and `1.4`, 11 builds each) and POSIX CMake builds into `posix` and `posix-daemon` (7 builds each on Linux). Run `simulation-1.1`, `simulation-1.4`, `posix`, and `posix-daemon` as separate matrix jobs for Linux `gcc`/`clang`, and `posix`, `simulation-1.1`, and `simulation-1.4` for `macos`. - `posix.yml`, `simulation.yml`, + `script/test`: Support filtering `expect` tests by category via `OT_EXPECT_CATEGORY`, splitting `expects-linux` into `expects-posix-cli`, `expects-posix-rcp`, and `expects-posix-tun`, and `expects` into `expects-cli` and `expects-non-cli`. - `otns.yml`: Reduce `connectivity` stress level from 6 to 3 to align its runtime with the other OTNS stress suites. - `fuzz.yml`: Reduce `fuzz-seconds` from 1800 to 900. CIFuzz on pull requests is a quick regression check (OSS-Fuzz's default `fuzz-seconds` is 600s) that only fuzzes targets affected by the PR against the existing OSS-Fuzz seed corpus and crash regressions, whereas deep continuous fuzzing of `main` already runs 24/7 on Google's OSS-Fuzz infrastructure.
This commit is contained in:
@@ -302,12 +302,13 @@ jobs:
|
||||
script/check-arm-build
|
||||
|
||||
gcc:
|
||||
name: gcc-${{ matrix.gcc_ver }}
|
||||
name: gcc-${{ matrix.gcc_ver }}-${{ matrix.target }}
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
gcc_ver: [9, 10, 11, 12]
|
||||
target: [simulation-1.1, simulation-1.4, posix, posix-daemon]
|
||||
env:
|
||||
CC: gcc-${{ matrix.gcc_ver }}
|
||||
CXX: g++-${{ matrix.gcc_ver }}
|
||||
@@ -333,16 +334,26 @@ jobs:
|
||||
sudo apt-get --no-install-recommends install -y gcc-${{ matrix.gcc_ver }} g++-${{ matrix.gcc_ver }} ninja-build libreadline-dev libncurses-dev
|
||||
- name: Build
|
||||
run: |
|
||||
script/check-simulation-build
|
||||
script/check-posix-build
|
||||
case ${{ matrix.target }} in
|
||||
simulation-1.1)
|
||||
script/check-simulation-build 1.1
|
||||
;;
|
||||
simulation-1.4)
|
||||
script/check-simulation-build 1.4
|
||||
;;
|
||||
posix | posix-daemon)
|
||||
script/check-posix-build "${{ matrix.target }}"
|
||||
;;
|
||||
esac
|
||||
|
||||
clang:
|
||||
name: clang-${{ matrix.clang_ver }}
|
||||
name: clang-${{ matrix.clang_ver }}-${{ matrix.target }}
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
clang_ver: ["17", "18", "19"]
|
||||
target: [simulation-1.1, simulation-1.4, posix, posix-daemon]
|
||||
env:
|
||||
CC: clang-${{ matrix.clang_ver }}
|
||||
CXX: clang++-${{ matrix.clang_ver }}
|
||||
@@ -366,8 +377,17 @@ jobs:
|
||||
sudo apt-get --no-install-recommends install -y ninja-build libreadline-dev libncurses-dev
|
||||
- name: Build
|
||||
run: |
|
||||
script/check-simulation-build
|
||||
script/check-posix-build
|
||||
case ${{ matrix.target }} in
|
||||
simulation-1.1)
|
||||
script/check-simulation-build 1.1
|
||||
;;
|
||||
simulation-1.4)
|
||||
script/check-simulation-build 1.4
|
||||
;;
|
||||
posix | posix-daemon)
|
||||
script/check-posix-build "${{ matrix.target }}"
|
||||
;;
|
||||
esac
|
||||
|
||||
gn:
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -391,10 +411,12 @@ jobs:
|
||||
script/check-gn-build
|
||||
|
||||
macos:
|
||||
name: macos-${{ matrix.CC }}
|
||||
name: macos-${{ matrix.CC }}-${{ matrix.target }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
CC: [clang, gcc]
|
||||
target: [posix, simulation-1.1, simulation-1.4]
|
||||
include:
|
||||
- CC: clang
|
||||
CXX: clang++
|
||||
@@ -422,5 +444,14 @@ jobs:
|
||||
unzip ninja-mac.zip && mv ninja /usr/local/bin/.
|
||||
- name: Build
|
||||
run: |
|
||||
script/check-posix-build
|
||||
script/check-simulation-build
|
||||
case ${{ matrix.target }} in
|
||||
simulation-1.1)
|
||||
script/check-simulation-build 1.1
|
||||
;;
|
||||
simulation-1.4)
|
||||
script/check-simulation-build 1.4
|
||||
;;
|
||||
posix)
|
||||
script/check-posix-build
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
with:
|
||||
oss-fuzz-project-name: 'openthread'
|
||||
language: 'c++'
|
||||
fuzz-seconds: 1800
|
||||
fuzz-seconds: 900
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
output-sarif: true
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ jobs:
|
||||
- suite: "commissioning"
|
||||
stress_level: 14
|
||||
- suite: "connectivity"
|
||||
stress_level: 6
|
||||
stress_level: 3
|
||||
- suite: "network-latency"
|
||||
stress_level: 10
|
||||
- suite: "multicast-performance"
|
||||
|
||||
+24
-17
@@ -46,10 +46,22 @@ permissions:
|
||||
jobs:
|
||||
|
||||
expects-linux:
|
||||
name: expects-posix-${{ matrix.category }}
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- category: cli
|
||||
expect_category: cli
|
||||
- category: rcp
|
||||
expect_category: non-cli
|
||||
- category: tun
|
||||
expect_category: tun
|
||||
env:
|
||||
CFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15
|
||||
CXXFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15
|
||||
OT_EXPECT_CATEGORY: ${{ matrix.expect_category }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
|
||||
@@ -71,35 +83,30 @@ jobs:
|
||||
sudo bash script/install_socat
|
||||
pip install bleak 'cryptography==43.0.0'
|
||||
- name: Run RCP Mode
|
||||
if: matrix.category != 'tun'
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
./script/test prepare_coredump_upload
|
||||
OT_OPTIONS='-DOT_READLINE=OFF -DOT_FULL_LOGS=ON -DOT_LOG_OUTPUT=PLATFORM_DEFINED' VIRTUAL_TIME=0 OT_NODE_TYPE=rcp ./script/test build expect
|
||||
- name: Run ot-fct
|
||||
if: matrix.category == 'rcp'
|
||||
run: |
|
||||
OT_CMAKE_NINJA_TARGET="ot-fct" script/cmake-build posix
|
||||
tests/scripts/expect/ot-fct.exp
|
||||
- name: Check Crash
|
||||
if: ${{ failure() }}
|
||||
- name: Check Crash (RCP)
|
||||
if: ${{ failure() && matrix.category != 'tun' }}
|
||||
run: |
|
||||
CRASHED=$(./script/test check_crash | tail -1)
|
||||
[[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed."
|
||||
echo "CRASHED_RCP=$CRASHED" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
if: ${{ failure() && env.CRASHED_RCP == '1' }}
|
||||
if: ${{ failure() && matrix.category != 'tun' && env.CRASHED_RCP == '1' }}
|
||||
with:
|
||||
name: core-expect-rcp
|
||||
name: core-expect-${{ matrix.category }}
|
||||
path: |
|
||||
./ot-core-dump/*
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: cov-expects-linux-1
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
- name: Run TUN Mode
|
||||
if: matrix.category == 'tun'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
echo 0 | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6
|
||||
@@ -113,20 +120,20 @@ jobs:
|
||||
ulimit -c unlimited
|
||||
./script/test prepare_coredump_upload
|
||||
OT_OPTIONS='-DOT_READLINE=OFF -DOT_FULL_LOGS=ON -DOT_LOG_OUTPUT=PLATFORM_DEFINED' OT_NATIVE_IP=1 VIRTUAL_TIME=0 OT_NODE_TYPE=rcp ./script/test clean build expect
|
||||
- name: Check Crash
|
||||
if: ${{ failure() }}
|
||||
- name: Check Crash (TUN)
|
||||
if: ${{ failure() && matrix.category == 'tun' }}
|
||||
run: |
|
||||
CRASHED=$(./script/test check_crash | tail -1)
|
||||
[[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed."
|
||||
echo "CRASHED_TUN=$CRASHED" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
if: ${{ failure() && env.CRASHED_TUN == '1' }}
|
||||
if: ${{ failure() && matrix.category == 'tun' && env.CRASHED_TUN == '1' }}
|
||||
with:
|
||||
name: core-expect-linux
|
||||
path: |
|
||||
./ot-core-dump/*
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
if: ${{ failure() }}
|
||||
if: ${{ failure() && matrix.category == 'tun' }}
|
||||
with:
|
||||
name: syslog-expect-linux
|
||||
path: /var/log/syslog
|
||||
@@ -135,7 +142,7 @@ jobs:
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: cov-expects-linux-2
|
||||
name: cov-expects-posix-${{ matrix.category }}
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
|
||||
@@ -180,10 +180,16 @@ jobs:
|
||||
retention-days: 1
|
||||
|
||||
expects:
|
||||
name: expects-${{ matrix.category }}
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
category: [cli, non-cli]
|
||||
env:
|
||||
COVERAGE: 1
|
||||
VIRTUAL_TIME: 0
|
||||
OT_EXPECT_CATEGORY: ${{ matrix.category }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
|
||||
@@ -218,7 +224,7 @@ jobs:
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
if: ${{ failure() && env.CRASHED == '1' }}
|
||||
with:
|
||||
name: core-expect
|
||||
name: core-expect-${{ matrix.category }}
|
||||
path: |
|
||||
./ot-core-dump/*
|
||||
- name: Generate Coverage
|
||||
@@ -226,7 +232,7 @@ jobs:
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: cov-expects
|
||||
name: cov-expects-${{ matrix.category }}
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
|
||||
@@ -31,8 +31,22 @@ set -euxo pipefail
|
||||
|
||||
main()
|
||||
{
|
||||
"$(dirname "$0")"/check-posix-build-cmake
|
||||
"$(dirname "$0")"/check-posix-build-cmake -DOT_DAEMON=ON
|
||||
case "${1:-all}" in
|
||||
posix)
|
||||
"$(dirname "$0")"/check-posix-build-cmake
|
||||
;;
|
||||
posix-daemon)
|
||||
"$(dirname "$0")"/check-posix-build-cmake -DOT_DAEMON=ON
|
||||
;;
|
||||
all)
|
||||
"$(dirname "$0")"/check-posix-build-cmake
|
||||
"$(dirname "$0")"/check-posix-build-cmake -DOT_DAEMON=ON
|
||||
;;
|
||||
*)
|
||||
echo "Unknown group: $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -31,7 +31,7 @@ set -euxo pipefail
|
||||
|
||||
main()
|
||||
{
|
||||
"$(dirname "$0")"/check-simulation-build-cmake
|
||||
"$(dirname "$0")"/check-simulation-build-cmake "$@"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -40,60 +40,62 @@ reset_source()
|
||||
rm -rf "$OT_BUILDDIR"
|
||||
}
|
||||
|
||||
build_all_features()
|
||||
readonly CPPFLAGS_ALL_FEATURES=(
|
||||
"-DOPENTHREAD_CONFIG_ANNOUNCE_SENDER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_ANYCAST_LOCATOR=1"
|
||||
"-DOPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_COAP_API_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DIAG_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DNS_DSO_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_ECDSA_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_JOINER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_LINK_RAW_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_BEACON_RSP_WHEN_JOINABLE_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_SOFTWARE_RETRANSMIT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MLE_ATTACH_BACKOFF_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MLE_STEERING_DATA_SET_OOB_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MPL_DYNAMIC_INTERVAL_ENABLE"
|
||||
"-DOPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_NCP_SPI_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_PING_SENDER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_BEACON_PAYLOAD_PARSING_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_OUTGOING_BEACON_PAYLOAD_ENABLE=1"
|
||||
)
|
||||
|
||||
build_v1_1_all_features()
|
||||
{
|
||||
local cppflags=(
|
||||
"-DOPENTHREAD_CONFIG_ANNOUNCE_SENDER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_ANYCAST_LOCATOR=1"
|
||||
"-DOPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_COAP_API_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DIAG_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_DNS_DSO_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_ECDSA_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_JOINER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_LINK_RAW_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_BEACON_RSP_WHEN_JOINABLE_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_SOFTWARE_RETRANSMIT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MLE_ATTACH_BACKOFF_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MLE_STEERING_DATA_SET_OOB_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MPL_DYNAMIC_INTERVAL_ENABLE"
|
||||
"-DOPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_NCP_SPI_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_PING_SENDER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_BEACON_PAYLOAD_PARSING_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_MAC_OUTGOING_BEACON_PAYLOAD_ENABLE=1"
|
||||
)
|
||||
local cppflags=("${CPPFLAGS_ALL_FEATURES[@]}")
|
||||
|
||||
# Build Thread 1.1 with full features
|
||||
reset_source
|
||||
@@ -141,6 +143,11 @@ build_all_features()
|
||||
-DOT_THREAD_VERSION=1.1 \
|
||||
-DOT_SIMULATION_VIRTUAL_TIME=ON \
|
||||
-DOT_OTNS=ON
|
||||
}
|
||||
|
||||
build_v1_4_and_misc()
|
||||
{
|
||||
local cppflags=("${CPPFLAGS_ALL_FEATURES[@]}")
|
||||
|
||||
# Thread 1.4 options
|
||||
local options=(
|
||||
@@ -275,9 +282,26 @@ build_multi_radio_links()
|
||||
}
|
||||
main()
|
||||
{
|
||||
build_all_features
|
||||
build_nest_common
|
||||
build_multi_radio_links
|
||||
case "${1:-all}" in
|
||||
1.1)
|
||||
build_v1_1_all_features
|
||||
build_nest_common
|
||||
build_multi_radio_links
|
||||
;;
|
||||
1.4)
|
||||
build_v1_4_and_misc
|
||||
;;
|
||||
all)
|
||||
build_v1_1_all_features
|
||||
build_v1_4_and_misc
|
||||
build_nest_common
|
||||
build_multi_radio_links
|
||||
;;
|
||||
*)
|
||||
echo "Unknown group: $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
+28
-1
@@ -465,7 +465,34 @@ do_expect()
|
||||
{
|
||||
local test_patterns
|
||||
|
||||
if [[ ${OT_NODE_TYPE} == rcp* ]]; then
|
||||
if [[ -n ${OT_EXPECT_CATEGORY:-} ]]; then
|
||||
case "${OT_EXPECT_CATEGORY}" in
|
||||
cli)
|
||||
test_patterns=(-name 'cli-*.exp')
|
||||
;;
|
||||
non-cli)
|
||||
if [[ ${OT_NODE_TYPE} == rcp* ]]; then
|
||||
test_patterns=(-name 'posix-*.exp')
|
||||
if [[ ${THREAD_VERSION} != "1.1" ]]; then
|
||||
test_patterns+=(-o -name 'v1_2-*.exp')
|
||||
test_patterns+=(-o -name 'v1_5-*.exp')
|
||||
fi
|
||||
else
|
||||
test_patterns=(-name 'simulation-*.exp' -o -name 'cli_non_rcp-*.exp')
|
||||
if [[ ${THREAD_VERSION} != "1.1" ]]; then
|
||||
test_patterns+=(-o -name 'v1_5-*.exp')
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
tun)
|
||||
test_patterns=(-name 'tun-*.exp')
|
||||
;;
|
||||
*)
|
||||
echo "Unknown OT_EXPECT_CATEGORY: ${OT_EXPECT_CATEGORY}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
elif [[ ${OT_NODE_TYPE} == rcp* ]]; then
|
||||
if [[ ${OT_NATIVE_IP} == 1 ]]; then
|
||||
test_patterns=(-name 'tun-*.exp')
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user