mirror of
https://github.com/espressif/openthread.git
synced 2026-08-30 22:09:54 +00:00
[posix] add argument to set max power table (#4878)
This commit adds a max power table for POSIX platform, which can customize the max allowed transmit power of each channel with the command line argument --max-power-table.
This commit is contained in:
+9
-3
@@ -122,6 +122,7 @@ build_posix()
|
||||
|
||||
options+=(
|
||||
"-DOT_PLATFORM=posix"
|
||||
"-DOT_POSIX_MAX_POWER_TABLE=ON"
|
||||
"-DOT_READLINE=readline"
|
||||
"-DOT_THREAD_VERSION=${version}"
|
||||
)
|
||||
@@ -250,16 +251,21 @@ do_cert_suite() {
|
||||
do_expect()
|
||||
{
|
||||
local ot_command
|
||||
local rcp_command=
|
||||
local test_pattern
|
||||
|
||||
if [[ "${NODE_MODE}" == rcp ]]; then
|
||||
ot_command="${OT_CLI_PATH} ${RADIO_DEVICE}"
|
||||
ot_command="${OT_CLI_PATH}"
|
||||
rcp_command="${RADIO_DEVICE}"
|
||||
test_pattern='posix-*.exp'
|
||||
else
|
||||
ot_command="${OT_BUILDDIR}/cmake/openthread-simulation-${THREAD_VERSION}/examples/apps/cli/ot-cli-ftd"
|
||||
test_pattern='cli-*.exp'
|
||||
fi
|
||||
|
||||
while read -r script; do
|
||||
rm -rf tmp
|
||||
OT_COMMAND="${ot_command}" "${script}" || {
|
||||
OT_COMMAND="${ot_command}" RCP_COMMAND="${rcp_command}" "${script}" || {
|
||||
local exit_code=$?
|
||||
echo -e "${COLOR_FAIL}FAIL${COLOR_NONE} ${script}"
|
||||
exit "${exit_code}"
|
||||
@@ -269,7 +275,7 @@ do_expect()
|
||||
if [[ $# != 0 ]]; then
|
||||
for script in "$@"; do echo ${script}; done
|
||||
else
|
||||
find tests/scripts/expect -type f -executable
|
||||
find tests/scripts/expect -type f -executable -name "${test_pattern}"
|
||||
fi
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user