Lines Matching +full:version +full:- +full:script

33 set -euo pipefail
35 OT_BUILDDIR="${OT_BUILDDIR:-${PWD}/build}"
53 OT_NODE_TYPE="${OT_NODE_TYPE:-cli}"
56 OT_NATIVE_IP="${OT_NATIVE_IP:-0}"
59 THREAD_VERSION="${THREAD_VERSION:-1.3}"
62 INTER_OP="${INTER_OP:-0}"
65 VERBOSE="${VERBOSE:-0}"
68 BORDER_ROUTING="${BORDER_ROUTING:-1}"
71 NAT64="${NAT64:-0}"
74 NAT64_SERVICE="${NAT64_SERVICE:-openthread}"
77 INTER_OP_BBR="${INTER_OP_BBR:-0}"
80 OT_COREDUMP_DIR="${PWD}/ot-core-dump"
83 FULL_LOGS=${FULL_LOGS:-0}
86 TREL=${TREL:-0}
89 LOCAL_OTBR_DIR=${LOCAL_OTBR_DIR:-""}
94 local version="$1"
96 "-DBUILD_TESTING=ON"
97 "-DOT_ANYCAST_LOCATOR=ON"
98 "-DOT_DNS_CLIENT=ON"
99 "-DOT_DNS_DSO=ON"
100 "-DOT_DNSSD_SERVER=ON"
101 "-DOT_ECDSA=ON"
102 "-DOT_EXTERNAL_HEAP=ON"
103 "-DOT_HISTORY_TRACKER=ON"
104 "-DOT_MESSAGE_USE_HEAP=OFF"
105 "-DOT_NETDATA_PUBLISHER=ON"
106 "-DOT_PING_SENDER=ON"
107 "-DOT_PLATFORM_LOG_CRASH_DUMP=ON"
108 "-DOT_REFERENCE_DEVICE=ON"
109 "-DOT_SERVICE=ON"
110 "-DOT_SRP_CLIENT=ON"
111 "-DOT_SRP_SERVER=ON"
112 "-DOT_UPTIME=ON"
113 "-DOT_THREAD_VERSION=${version}"
117 options+=("-DOT_FULL_LOGS=ON")
120 if [[ ${version} != "1.1" ]]; then
121 options+=("-DOT_DUA=ON")
122 options+=("-DOT_MLR=ON")
126 options+=("-DOT_SIMULATION_VIRTUAL_TIME=ON")
129 if [[ ${version} != "1.1" ]]; then
130 options+=("-DOT_CSL_RECEIVER=ON")
131 options+=("-DOT_LINK_METRICS_INITIATOR=ON")
132 options+=("-DOT_LINK_METRICS_SUBJECT=ON")
133 options+=("-DOT_LINK_METRICS_MANAGER=ON")
142 …# causing the ot-cli POSIX app to send the reset to simulation RCP successfully instead of p…
144 options+=("-DOT_PLATFORM_BOOTLOADER_MODE=ON")
152 options+=("-DOT_SIMULATION_INFRA_IF=OFF")
155 …OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}" "${OT_SRCDIR}"/script/cmake-b…
158 …ARGET=ot-rcp OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}" "${OT_SRCDIR}"/s…
161 if [[ ${version} != "1.1" && ${INTER_OP_BBR} == 1 ]]; then
163 options+=("-DOT_BACKBONE_ROUTER=ON")
165 …OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}-bbr" "${OT_SRCDIR}"/script/cma…
168 …GET=ot-rcp OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}-bbr" "${OT_SRCDIR}"…
176 local version="$1"
178 "-DBUILD_TESTING=ON"
179 "-DOT_MESSAGE_USE_HEAP=ON"
180 "-DOT_PLATFORM_BOOTLOADER_MODE=ON"
181 "-DOT_PLATFORM_LOG_CRASH_DUMP=ON"
182 "-DOT_THREAD_VERSION=${version}"
185 if [[ ${version} != "1.1" ]]; then
186 options+=("-DOT_DUA=ON")
187 options+=("-DOT_MLR=ON")
188 options+=("-DOT_LINK_METRICS_INITIATOR=ON")
189 options+=("-DOT_LINK_METRICS_SUBJECT=ON")
190 options+=("-DOT_LINK_METRICS_MANAGER=ON")
194 options+=("-DOT_FULL_LOGS=ON")
198 options+=("-DOT_POSIX_VIRTUAL_TIME=ON")
202 options+=("-DOT_PLATFORM_UDP=ON" "-DOT_PLATFORM_NETIF=ON")
209 …OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-posix-${version}" "${OT_SRCDIR}"/script/cmake-build …
211 if [[ ${version} != "1.1" && ${INTER_OP_BBR} == 1 ]]; then
213 options+=("-DOT_BACKBONE_ROUTER=ON")
215 …OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-posix-${version}-bbr" "${OT_SRCDIR}"/script/cmake-bu…
221 local version="$1"
223 build_simulation "${version}"
226 build_posix "${version}"
241 ./script/gcda-tool clean
242 rm -rfv "${OT_BUILDDIR}" || sudo rm -rfv "${OT_BUILDDIR}"
247 local version=$1
248 local builddir="${OT_BUILDDIR}/openthread-simulation-${version}"
250 if [[ ! -d ${builddir} ]]; then
266 do_unit_version "1.3-bbr"
272 export top_builddir="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}"
276 rcp | rcp-cli | cli)
279 rcp-ncp | ncp)
280 export NODE_TYPE=ncp-sim
285 export top_builddir_1_3_bbr="${OT_BUILDDIR}/openthread-simulation-1.3-bbr"
287 export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
291 export PYTHONPATH=tests/scripts/thread-cert
293 [[ ! -d tmp ]] || rm -rvf tmp
300 export top_builddir="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}"
304 export top_builddir_1_3_bbr="${OT_BUILDDIR}/openthread-simulation-1.3-bbr"
306 export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
310 export PYTHONPATH=tests/scripts/thread-cert
315 mkdir -p ot_testing
316 …./tests/scripts/thread-cert/run_cert_suite.py --run-directory ot_testing --multiply "${MULTIPLY:-1…
322 echo "Downloading thread-wireshark from https://github.com/openthread/wireshark/releases ..."
323 …rl=https://github.com/openthread/wireshark/releases/download/ot-pktverify-20200727/thread-wireshar…
324 local save_file=/tmp/thread-wireshark.tar.gz
326 rm -rf /tmp/thread-wireshark || true
327 rm -rf "${save_file}" || true
328 curl -L "${download_url}" -o "${save_file}"
329 tar -C /tmp -xvzf "${save_file}"
331 LD_LIBRARY_PATH=/tmp/thread-wireshark /tmp/thread-wireshark/tshark -v
332 LD_LIBRARY_PATH=/tmp/thread-wireshark /tmp/thread-wireshark/dumpcap -v
333 rm -rf "${save_file}"
342 "-DOT_ANYCAST_LOCATOR=ON"
343 "-DOT_COVERAGE=ON"
344 "-DOT_DNS_CLIENT=ON"
345 "-DOT_DUA=ON"
346 "-DOT_MLR=ON"
347 "-DOT_NETDATA_PUBLISHER=ON"
348 "-DOT_SLAAC=ON"
349 "-DOT_SRP_CLIENT=ON"
350 "-DOT_FULL_LOGS=ON"
351 "-DOT_UPTIME=ON"
352 "-DOTBR_DNS_UPSTREAM_QUERY=ON"
353 "-DOTBR_DUA_ROUTING=ON"
366 "MDNS=${OTBR_MDNS:-mDNSResponder}"
367 "FIREWALL=${FIREWALL:-1}"
372 … otbr_options+=("-DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_DNSSD_SERVER_BIND_UNSPECIFIED_NETIF=1'")
376 otbr_options+=("-DOTBR_TREL=ON")
378 otbr_options+=("-DOTBR_TREL=OFF")
381 local otbr_docker_image=${OTBR_DOCKER_IMAGE:-otbr-ot12-backbone-ci}
385 docker_build_args+=("--build-arg" "$arg")
388 otbrdir=$(mktemp -d -t otbr_XXXXXX)
392 if [[ -z ${LOCAL_OTBR_DIR} ]]; then
393 … ./script/git-tool clone https://github.com/openthread/ot-br-posix.git --depth 1 "${otbrdir}"
395 rsync -r \
396 --exclude=third_party/openthread/repo \
397 --exclude=.git \
398 --exclude=build \
404 rm -rf third_party/openthread/repo
405 rsync -r \
406 --exclude=build \
407 --exclude=ot_testing \
408 --exclude=__pycache__ \
411 rm -rf .git
413 docker build -t "${otbr_docker_image}" -f etc/docker/Dockerfile . \
415 --build-arg OTBR_OPTIONS="${otbr_options[*]}"
418 rm -rf "${otbrdir}"
423 ./tests/scripts/thread-cert/pktverify/verify.py "$1"
430 for script in "$@"; do
431 echo -e "\n${OT_COLOR_PASS}EXEC${OT_COLOR_NONE} ${script}"
432 sudo killall ot-rcp || true
433 sudo killall ot-cli || true
434 sudo killall ot-cli-ftd || true
435 sudo killall ot-cli-mtd || true
436 sudo rm -rf tmp
440 sudo -E expect -df "${script}" 2>"${log_file}"
442 expect -df "${script}" 2>"${log_file}"
447 …# The exit status 77 for skipping is inherited from automake's test driver for script-based testsu…
449 echo -e "\n${OT_COLOR_SKIP}SKIP${OT_COLOR_NONE} ${script}"
452 echo -e "\n${OT_COLOR_FAIL}FAIL${OT_COLOR_NONE} ${script}"
457 echo -e "\n${OT_COLOR_PASS}PASS${OT_COLOR_NONE} ${script}"
470 test_patterns=(-name 'tun-*.exp')
472 test_patterns=(-name 'posix-*.exp' -o -name 'cli-*.exp')
474 test_patterns+=(-o -name 'v1_2-*.exp')
478 test_patterns=(-name 'cli-*.exp' -o -name 'simulation-*.exp' -o -name 'cli_non_rcp-*.exp')
485 export -f ot_exec_expect_script
487 …s/scripts/expect -type f -perm "$([[ $OSTYPE == darwin* ]] && echo '+' || echo '/')"111 \( "${test…
499 'rcp' or 'rcp-cli' for CLI on POSIX platform.
500 'rcp-ncp' for NCP on POSIX platform.
504 'OT_BUILDDIR=\${PWD}/my_awesome_build ./script/test clean build'.
510 …INTER_OP_BBR 1 to build bbr version together. Only works when THREAD_VERSION is 1.3. The defaul…
515 …cert Run a single thread-cert test. ENVIRONMENTS should be the same as those given to b…
516 …cert_suite Run a batch of thread-cert tests and summarize the test results. Only echo logs fo…
523 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
524 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
527 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
528 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
531 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
532 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
535 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
536 VIRTUAL_TIME=0 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
539 …THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_Router…
540 …THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeou…
543 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_test_enhanced_keep_alive.py
544 INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_router_5_1_1.py
545 INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert_suite tests/scripts/thread-cert/v1_2_*
548 $0 clean build expect tests/scripts/expect/cli-log-level.exp
559 echo "$OT_COREDUMP_DIR/corefile-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern
560 rm -rf "$OT_COREDUMP_DIR"
561 mkdir -p "$OT_COREDUMP_DIR"
566 mkdir -p "$OT_COREDUMP_DIR/so-lib"
567 cp /lib/x86_64-linux-gnu/libgcc_s.so.1 "$OT_COREDUMP_DIR/so-lib"
568 cp /lib/x86_64-linux-gnu/libc.so.6 "$OT_COREDUMP_DIR/so-lib"
569 cp /lib64/ld-linux-x86-64.so.2 "$OT_COREDUMP_DIR/so-lib"
574 shopt -s nullglob
577 declare -A bin_list=([dummy]='')
579 bin=$(file "$f" | grep -E -o "execfn: '(.*')," | sed -r "s/execfn: '(.*)',/\1/")
585 # Add postfix for binaries to avoid conflicts caused by different Thread version
587 if [[ $key =~ openthread-(simulation|posix)-([0-9]\.[0-9]) ]]; then
588 … postfix="-$(echo "$key" | sed -r "s/.*openthread-(simulation|posix)-([0-9]\.[0-9]).*/\2/")"
596 [[ ${#bin_list[@]} -gt 1 ]] && (
604 mkdir -p tmp/
606 rm -f tmp/coverage.lcov
609 llvm_gcov="$(mktemp -d)/llvm-gcov"
611 echo 'exec llvm-cov gcov "$@"' >>"$llvm_gcov"
613 lcov --gcov-tool "$llvm_gcov" --directory . --capture --output-file tmp/coverage.info
615 ./script/gcda-tool collect
616 ./script/gcda-tool install
618 lcov --directory . --capture --output-file tmp/coverage.info
620 lcov --list tmp/coverage.info
621 lcov --extract tmp/coverage.info "$PWD/src/core/common/message.cpp" | c++filt
626 ls -R coverage/
628 readarray -d '' files < <(find coverage/ -type f -name 'coverage*.info' -print0)
632 args+=('-a')
635 lcov "${args[@]}" -o final.info
643 …export RADIO_DEVICE="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}/examples/apps/ncp/ot-r…
644 export OT_CLI_PATH="${OT_BUILDDIR}/openthread-posix-${THREAD_VERSION}/src/posix/ot-cli"
647 … export RADIO_DEVICE_1_1="${OT_BUILDDIR}/openthread-simulation-1.1/examples/apps/ncp/ot-rcp"
648 export OT_CLI_PATH_1_1="${OT_BUILDDIR}/openthread-posix-1.1/src/posix/ot-cli"
649 export OT_CLI_PATH_BBR="${OT_BUILDDIR}/openthread-posix-1.3-bbr/src/posix/ot-cli"
653 export OT_SIMULATION_APPS="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}/examples/apps"
654 export OT_POSIX_APPS="${OT_BUILDDIR}/openthread-posix-${THREAD_VERSION}/src/posix"
674 export -n VERBOSE
678 read -r -a ot_extra_options <<<"${OT_OPTIONS}"
688 if [[ -z ${1-} ]]; then
730 ./script/package "${ot_extra_options[@]}"
751 echo -e "${OT_COLOR_FAIL}Warning:${OT_COLOR_NONE} Ignoring: '$1'"