• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:build +full:- +full:options

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.4}"
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:-""}
95 local options=(
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_SRP_SERVER_FAST_START_MDOE=ON"
113 "-DOT_UPTIME=ON"
114 "-DOT_THREAD_VERSION=${version}"
118 options+=("-DOT_FULL_LOGS=ON")
122 options+=("-DOT_DUA=ON")
123 options+=("-DOT_MLR=ON")
127 options+=("-DOT_SIMULATION_VIRTUAL_TIME=ON")
131 options+=("-DOT_CSL_RECEIVER=ON")
132 options+=("-DOT_LINK_METRICS_INITIATOR=ON")
133 options+=("-DOT_LINK_METRICS_SUBJECT=ON")
134 options+=("-DOT_LINK_METRICS_MANAGER=ON")
135 options+=("-DOT_WAKEUP_COORDINATOR=ON")
136 options+=("-DOT_WAKEUP_END_DEVICE=ON")
145 …# causing the ot-cli POSIX app to send the reset to simulation RCP successfully instead of p…
147 options+=("-DOT_PLATFORM_BOOTLOADER_MODE=ON")
151 options+=("${ot_extra_options[@]}")
155 options+=("-DOT_SIMULATION_INFRA_IF=OFF")
158 …_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}" "${OT_SRCDIR}"/script/cmake-build sim…
161 …ARGET=ot-rcp OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}" "${OT_SRCDIR}"/s…
166 options+=("-DOT_BACKBONE_ROUTER=ON")
168 …UILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}-bbr" "${OT_SRCDIR}"/script/cmake-build s…
171 …GET=ot-rcp OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}-bbr" "${OT_SRCDIR}"…
180 local options=(
181 "-DBUILD_TESTING=ON"
182 "-DOT_MESSAGE_USE_HEAP=ON"
183 "-DOT_PLATFORM_BOOTLOADER_MODE=ON"
184 "-DOT_PLATFORM_LOG_CRASH_DUMP=ON"
185 "-DOT_THREAD_VERSION=${version}"
189 options+=("-DOT_DUA=ON")
190 options+=("-DOT_MLR=ON")
191 options+=("-DOT_LINK_METRICS_INITIATOR=ON")
192 options+=("-DOT_LINK_METRICS_SUBJECT=ON")
193 options+=("-DOT_LINK_METRICS_MANAGER=ON")
197 options+=("-DOT_FULL_LOGS=ON")
201 options+=("-DOT_POSIX_VIRTUAL_TIME=ON")
205 options+=("-DOT_PLATFORM_UDP=ON" "-DOT_PLATFORM_NETIF=ON")
209 options+=("${ot_extra_options[@]}")
212 …CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-posix-${version}" "${OT_SRCDIR}"/script/cmake-build pos…
216 options+=("-DOT_BACKBONE_ROUTER=ON")
218 …AKE_BUILD_DIR="${OT_BUILDDIR}/openthread-posix-${version}-bbr" "${OT_SRCDIR}"/script/cmake-build p…
244 ./script/gcda-tool clean
245 rm -rfv "${OT_BUILDDIR}" || sudo rm -rfv "${OT_BUILDDIR}"
251 local builddir="${OT_BUILDDIR}/openthread-simulation-${version}"
253 if [[ ! -d ${builddir} ]]; then
254 echo "Cannot find build directory: ${builddir}"
269 do_unit_version "1.4-bbr"
275 export top_builddir="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}"
279 rcp | rcp-cli | cli)
282 rcp-ncp | ncp)
283 export NODE_TYPE=ncp-sim
288 export top_builddir_1_4_bbr="${OT_BUILDDIR}/openthread-simulation-1.4-bbr"
290 export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
294 export PYTHONPATH=tests/scripts/thread-cert
296 [[ ! -d tmp ]] || rm -rvf tmp
303 export top_builddir="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}"
307 export top_builddir_1_4_bbr="${OT_BUILDDIR}/openthread-simulation-1.4-bbr"
309 export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
313 export PYTHONPATH=tests/scripts/thread-cert
318 mkdir -p ot_testing
319 …./tests/scripts/thread-cert/run_cert_suite.py --run-directory ot_testing --multiply "${MULTIPLY:-1…
325 echo "Downloading thread-wireshark from https://github.com/openthread/wireshark/releases ..."
326 …rl=https://github.com/openthread/wireshark/releases/download/ot-pktverify-20200727/thread-wireshar…
327 local save_file=/tmp/thread-wireshark.tar.gz
329 rm -rf /tmp/thread-wireshark || true
330 rm -rf "${save_file}" || true
331 curl -L "${download_url}" -o "${save_file}"
332 tar -C /tmp -xvzf "${save_file}"
334 LD_LIBRARY_PATH=/tmp/thread-wireshark /tmp/thread-wireshark/tshark -v
335 LD_LIBRARY_PATH=/tmp/thread-wireshark /tmp/thread-wireshark/dumpcap -v
336 rm -rf "${save_file}"
345 "-DOT_ANYCAST_LOCATOR=ON"
346 "-DOT_COVERAGE=ON"
347 "-DOT_DNS_CLIENT=ON"
348 "-DOT_DUA=ON"
349 "-DOT_MLR=ON"
350 "-DOT_NETDATA_PUBLISHER=ON"
351 "-DOT_SLAAC=ON"
352 "-DOT_SRP_CLIENT=ON"
353 "-DOT_FULL_LOGS=ON"
354 "-DOT_UPTIME=ON"
355 "-DOTBR_DNS_UPSTREAM_QUERY=ON"
356 "-DOTBR_DUA_ROUTING=ON"
357 "-DOTBR_DHCP6_PD=ON"
370 "MDNS=${OTBR_MDNS:-mDNSResponder}"
371 "FIREWALL=${FIREWALL:-1}"
376 … otbr_options+=("-DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_DNSSD_SERVER_BIND_UNSPECIFIED_NETIF=1'")
380 otbr_options+=("-DOTBR_TREL=ON")
382 otbr_options+=("-DOTBR_TREL=OFF")
385 local otbr_docker_image=${OTBR_DOCKER_IMAGE:-otbr-ot12-backbone-ci}
389 docker_build_args+=("--build-arg" "$arg")
392 otbrdir=$(mktemp -d -t otbr_XXXXXX)
396 if [[ -z ${LOCAL_OTBR_DIR} ]]; then
397 … ./script/git-tool clone https://github.com/openthread/ot-br-posix.git --depth 1 "${otbrdir}"
399 rsync -r \
400 --exclude=third_party/openthread/repo \
401 --exclude=.git \
402 --exclude=build \
408 rm -rf third_party/openthread/repo
409 rsync -r \
410 --exclude=build \
411 --exclude=ot_testing \
412 --exclude=__pycache__ \
415 rm -rf .git
417 docker build -t "${otbr_docker_image}" -f etc/docker/Dockerfile . \
419 --build-arg OTBR_OPTIONS="${otbr_options[*]}"
422 rm -rf "${otbrdir}"
427 ./tests/scripts/thread-cert/pktverify/verify.py "$1"
435 echo -e "\n${OT_COLOR_PASS}EXEC${OT_COLOR_NONE} ${script}"
436 sudo killall ot-rcp || true
437 sudo killall ot-cli || true
438 sudo killall ot-cli-ftd || true
439 sudo killall ot-cli-mtd || true
440 sudo rm -rf tmp
444 sudo -E expect -df "${script}" 2>"${log_file}"
446 expect -df "${script}" 2>"${log_file}"
451 …# The exit status 77 for skipping is inherited from automake's test driver for script-based testsu…
453 echo -e "\n${OT_COLOR_SKIP}SKIP${OT_COLOR_NONE} ${script}"
456 echo -e "\n${OT_COLOR_FAIL}FAIL${OT_COLOR_NONE} ${script}"
461 echo -e "\n${OT_COLOR_PASS}PASS${OT_COLOR_NONE} ${script}"
474 test_patterns=(-name 'tun-*.exp')
476 test_patterns=(-name 'posix-*.exp' -o -name 'cli-*.exp')
478 test_patterns+=(-o -name 'v1_2-*.exp')
482 test_patterns=(-name 'cli-*.exp' -o -name 'simulation-*.exp' -o -name 'cli_non_rcp-*.exp')
489 export -f ot_exec_expect_script
491 …s/scripts/expect -type f -perm "$([[ $OSTYPE == darwin* ]] && echo '+' || echo '/')"111 \( "${test…
503 'rcp' or 'rcp-cli' for CLI on POSIX platform.
504 'rcp-ncp' for NCP on POSIX platform.
507 …OT_BUILDDIR The output directory for cmake build. By default the directory is './build'. For e…
508 'OT_BUILDDIR=\${PWD}/my_awesome_build ./script/test clean build'.
509 VERBOSE 1 to build or test verbosely. The default is 0.
513 … INTER_OP 1 to build 1.1 together. Only works when THREAD_VERSION is 1.4. The default is 0.
514 …INTER_OP_BBR 1 to build bbr version together. Only works when THREAD_VERSION is 1.4. The defaul…
517 clean Clean built files to prepare for new build.
518build Build project for running tests. This can be used to rebuild the project for chang…
519 …cert Run a single thread-cert test. ENVIRONMENTS should be the same as those given to b…
520 …cert_suite Run a batch of thread-cert tests and summarize the test results. Only echo logs fo…
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 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
536 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
539 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
540 VIRTUAL_TIME=0 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
543 …THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_Router…
544 …THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeou…
547 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_test_enhanced_keep_alive.py
548 INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_router_5_1_1.py
549 INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert_suite tests/scripts/thread-cert/v1_2_*
552 $0 clean build expect tests/scripts/expect/cli-log-level.exp
555 $0 clean build expect
563 echo "$OT_COREDUMP_DIR/corefile-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern
564 rm -rf "$OT_COREDUMP_DIR"
565 mkdir -p "$OT_COREDUMP_DIR"
570 mkdir -p "$OT_COREDUMP_DIR/so-lib"
571 cp /lib/x86_64-linux-gnu/libgcc_s.so.1 "$OT_COREDUMP_DIR/so-lib"
572 cp /lib/x86_64-linux-gnu/libc.so.6 "$OT_COREDUMP_DIR/so-lib"
573 cp /lib64/ld-linux-x86-64.so.2 "$OT_COREDUMP_DIR/so-lib"
578 shopt -s nullglob
581 declare -A bin_list=([dummy]='')
583 bin=$(file "$f" | grep -E -o "execfn: '(.*')," | sed -r "s/execfn: '(.*)',/\1/")
591 if [[ $key =~ openthread-(simulation|posix)-([0-9]\.[0-9]) ]]; then
592 … postfix="-$(echo "$key" | sed -r "s/.*openthread-(simulation|posix)-([0-9]\.[0-9]).*/\2/")"
600 [[ ${#bin_list[@]} -gt 1 ]] && (
608 mkdir -p tmp/
610 rm -f tmp/coverage.lcov
613 llvm_gcov="$(mktemp -d)/llvm-gcov"
615 echo 'exec llvm-cov gcov "$@"' >>"$llvm_gcov"
617 lcov --gcov-tool "$llvm_gcov" --directory . --capture --output-file tmp/coverage.info
619 ./script/gcda-tool collect
620 ./script/gcda-tool install
622 lcov --directory . --capture --output-file tmp/coverage.info
624 lcov --list tmp/coverage.info
625 lcov --extract tmp/coverage.info "$PWD/src/core/common/message.cpp" | c++filt
630 ls -R coverage/
632 readarray -d '' files < <(find coverage/ -type f -name 'coverage*.info' -print0)
636 args+=('-a')
639 lcov "${args[@]}" -o final.info
647 …export RADIO_DEVICE="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}/examples/apps/ncp/ot-r…
648 export OT_CLI_PATH="${OT_BUILDDIR}/openthread-posix-${THREAD_VERSION}/src/posix/ot-cli"
651 … export RADIO_DEVICE_1_1="${OT_BUILDDIR}/openthread-simulation-1.1/examples/apps/ncp/ot-rcp"
652 export OT_CLI_PATH_1_1="${OT_BUILDDIR}/openthread-posix-1.1/src/posix/ot-cli"
653 export OT_CLI_PATH_BBR="${OT_BUILDDIR}/openthread-posix-1.4-bbr/src/posix/ot-cli"
657 export OT_SIMULATION_APPS="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}/examples/apps"
658 export OT_POSIX_APPS="${OT_BUILDDIR}/openthread-posix-${THREAD_VERSION}/src/posix"
678 export -n VERBOSE
682 read -r -a ot_extra_options <<<"${OT_OPTIONS}"
692 if [[ -z ${1-} ]]; then
704 build)
753 echo -e "${OT_COLOR_FAIL}Warning:${OT_COLOR_NONE} Ignoring: '$1'"