• Home
  • Raw
  • Download

Lines Matching +full:cli +full:- +full:ftd

29 # Test basic functionality of otbr-agent under NCP mode.
33 set -euxo pipefail
40 #---------------------------------------
42 #---------------------------------------
43 OT_CLI="${OT_CLI:-ot-cli-ftd}"
46 OT_NCP="${OT_NCP:-ot-ncp-ftd}"
49 OTBR_DOCKER_IMAGE="${OTBR_DOCKER_IMAGE:-otbr-ncp}"
52 ABS_TOP_BUILDDIR="$(cd "${top_builddir:-"${SCRIPT_DIR}"/../../}" && pwd)"
55 ABS_TOP_SRCDIR="$(cd "${top_srcdir:-"${SCRIPT_DIR}"/../../}" && pwd)"
73 readonly OTBR_VERBOSE="${OTBR_VERBOSE:-0}"
75 #----------------------------------------
77 #----------------------------------------
87 [[ -f $1 ]] || die "Missing file: $1"
92 [[ -x $1 ]] || die "Missing executable: $1"
97 logger -s -p syslog.alert "OTBR_TEST: $*"
100 #----------------------------------------
102 #----------------------------------------
103 TEST_BASE=/tmp/test-otbr
106 OTBR_AGENT=otbr-agent
115 OTBR_DBUS_CONF="${ABS_TOP_BUILDDIR}/src/agent/otbr-agent.conf"
129 #----------------------------------------
131 #----------------------------------------
134 sudo rm -rf "${ABS_TOP_OT_BUILDDIR}/ncp"
135 sudo rm -rf "${ABS_TOP_OT_BUILDDIR}/cli"
136 …OT_CMAKE_BUILD_DIR=${ABS_TOP_OT_BUILDDIR}/ncp "${ABS_TOP_OT_SRCDIR}"/script/cmake-build simulation…
137 -DOT_MTD=OFF -DOT_RCP=OFF -DOT_APP_CLI=OFF -DOT_APP_RCP=OFF \
138 -DOT_BORDER_ROUTING=ON -DOT_NCP_INFRA_IF=ON -DOT_SIMULATION_INFRA_IF=OFF \
139-DOT_SRP_SERVER=ON -DOT_SRP_ADV_PROXY=ON -DOT_PLATFORM_DNSSD=ON -DOT_SIMULATION_DNSSD=OFF -DOT_NCP…
140 -DBUILD_TESTING=OFF
141 …OT_CMAKE_BUILD_DIR=${ABS_TOP_OT_BUILDDIR}/cli "${ABS_TOP_OT_SRCDIR}"/script/cmake-build simulation…
142 -DOT_MTD=OFF -DOT_RCP=OFF -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
143 -DOT_BORDER_ROUTING=OFF \
144 -DBUILD_TESTING=OFF
150 "-DOT_THREAD_VERSION=1.4"
151 "-DOTBR_DBUS=ON"
152 "-DOTBR_FEATURE_FLAGS=ON"
153 "-DOTBR_TELEMETRY_DATA_API=ON"
154 "-DOTBR_TREL=ON"
155 "-DOTBR_LINK_METRICS_TELEMETRY=ON"
156 "-DOTBR_SRP_ADVERTISING_PROXY=ON"
158 sudo docker build -t "${OTBR_DOCKER_IMAGE}" \
159 -f ./etc/docker/Dockerfile . \
160 --build-arg NAT64=0 \
161 --build-arg NAT64_SERVICE=0 \
162 --build-arg DNS64=0 \
163 --build-arg WEB_GUI=0 \
164 --build-arg REST_API=0 \
165 --build-arg FIREWALL=0 \
166 --build-arg OTBR_OPTIONS="${otbr_docker_options[*]}"
173 …docker network create --driver bridge --ipv6 --subnet 9101::/64 -o "com.docker.network.bridge.name…
177 sudo sysctl -w net.ipv6.conf.backbone1.accept_ra=2
178 sudo sysctl -w net.ipv6.conf.backbone1.accept_ra_rt_info_max_plen=64
186 sudo rm -vrf "${TEST_BASE}/tmp"
188 sudo rm -vf "/tmp/openthread.lock"
190 ot_cli=$(find "${ABS_TOP_OT_BUILDDIR}" -name "${OT_CLI}")
191 ot_ncp=$(find "${ABS_TOP_OT_BUILDDIR}" -name "${OT_NCP}")
201 if [[ -f /etc/logrotate.conf ]]; then
202 sudo logrotate -f /etc/logrotate.conf || true
205 # Preparation for otbr-agent
207 sudo cp "${OTBR_DBUS_CONF}" /etc/dbus-1/system.d
214 # From now on - all exits are TRAPPED
224 write_syslog "EXIT ${EXIT_CODE} - output logs"
226 sudo pkill -f "${OTBR_AGENT}" || true
227 sudo pkill -f "${OT_CLI}" || true
228 sudo pkill -f "${OT_NCP}" || true
232 sudo rm /etc/dbus-1/system.d/otbr-agent.conf || true
233 sudo rm -rf "${STAGE_DIR}" || true
234 sudo rm -rf "${BUILD_DIR}" || true
246 echo -e "\n${OTBR_COLOR_PASS}EXEC${OTBR_COLOR_NONE} ${script}"
247 sudo killall ot-rcp || true
248 sudo killall ot-cli || true
249 sudo killall ot-cli-ftd || true
250 sudo killall ot-cli-mtd || true
251 sudo killall ot-ncp-ftd || true
252 sudo killall ot-ncp-mtd || true
253 sudo rm -rf tmp
256 sudo -E expect -df "${script}" 2>"${log_file}"
260 echo -e "\n${OTBR_COLOR_FAIL}FAIL${OTBR_COLOR_NONE} ${script}"
264 echo -e "\n${OTBR_COLOR_PASS}PASS${OTBR_COLOR_NONE} ${script}"
276 mapfile -t test_files < <(find "${EXPECT_SCRIPT_DIR}" -type f -name "ncp_*.exp")
289 build_ot_sim Build simulated ot-cli-ftd and ot-ncp-ftd for testing.
328 echo -e "${OTBR_COLOR_FAIL}Warning:${OTBR_COLOR_NONE} Ignoring: '$1'"