• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:build +full:- +full:arg

33 set -euo pipefail
35 readonly OT_BUILDDIR="${OT_BUILDDIR:-${PWD}/build}"
43 readonly OT_NODE_TYPE="${OT_NODE_TYPE:-cli}"
44 readonly OT_NATIVE_IP="${OT_NATIVE_IP:-0}"
45 readonly THREAD_VERSION="${THREAD_VERSION:-1.3}"
46 readonly INTER_OP="${INTER_OP:-0}"
47 readonly VERBOSE="${VERBOSE:-0}"
48 readonly BORDER_ROUTING="${BORDER_ROUTING:-1}"
49 readonly NAT64="${NAT64:-0}"
50 readonly INTER_OP_BBR="${INTER_OP_BBR:-1}"
52 readonly OT_COREDUMP_DIR="${PWD}/ot-core-dump"
53 readonly FULL_LOGS=${FULL_LOGS:-0}
54 readonly TREL=${TREL:-0}
55 readonly LOCAL_OTBR_DIR=${LOCAL_OTBR_DIR:-""}
61 "-DBUILD_TESTING=ON"
62 "-DOT_ANYCAST_LOCATOR=ON"
63 "-DOT_DNS_CLIENT=ON"
64 "-DOT_DNS_DSO=ON"
65 "-DOT_DNSSD_SERVER=ON"
66 "-DOT_ECDSA=ON"
67 "-DOT_EXTERNAL_HEAP=ON"
68 "-DOT_HISTORY_TRACKER=ON"
69 "-DOT_MESSAGE_USE_HEAP=OFF"
70 "-DOT_NETDATA_PUBLISHER=ON"
71 "-DOT_PING_SENDER=ON"
72 "-DOT_REFERENCE_DEVICE=ON"
73 "-DOT_SERVICE=ON"
74 "-DOT_SRP_CLIENT=ON"
75 "-DOT_SRP_SERVER=ON"
76 "-DOT_UPTIME=ON"
77 "-DOT_THREAD_VERSION=${version}"
81 options+=("-DOT_FULL_LOGS=ON")
85 options+=("-DOT_DUA=ON")
86 options+=("-DOT_MLR=ON")
90 options+=("-DOT_SIMULATION_VIRTUAL_TIME=ON")
94 options+=("-DOT_CSL_RECEIVER=ON")
95 options+=("-DOT_LINK_METRICS_INITIATOR=ON")
96 options+=("-DOT_LINK_METRICS_SUBJECT=ON")
103 …OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}" "${OT_SRCDIR}"/script/cmake-b…
106 …ARGET=ot-rcp OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}" "${OT_SRCDIR}"/s…
111 options+=("-DOT_BACKBONE_ROUTER=ON")
113 …OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}-bbr" "${OT_SRCDIR}"/script/cma…
116 …GET=ot-rcp OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}-bbr" "${OT_SRCDIR}"…
125 local options=("-DOT_MESSAGE_USE_HEAP=ON" "-DOT_THREAD_VERSION=${version}" "-DBUILD_TESTING=ON")
128 options+=("-DOT_DUA=ON")
129 options+=("-DOT_MLR=ON")
133 options+=("-DOT_FULL_LOGS=ON")
137 options+=("-DOT_POSIX_VIRTUAL_TIME=ON")
141 options+=("-DOT_PLATFORM_UDP=ON" "-DOT_PLATFORM_NETIF=ON")
148 …OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-posix-${version}" "${OT_SRCDIR}"/script/cmake-build
152 options+=("-DOT_BACKBONE_ROUTER=ON")
154 …OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-posix-${version}-bbr" "${OT_SRCDIR}"/script/cmake-bu…
180 ./script/gcda-tool clean
181 rm -rfv "${OT_BUILDDIR}" || sudo rm -rfv "${OT_BUILDDIR}"
187 local builddir="${OT_BUILDDIR}/openthread-simulation-${version}"
189 if [[ ! -d ${builddir} ]]; then
190 echo "Cannot find build directory: ${builddir}"
205 do_unit_version "1.3-bbr"
211 export top_builddir="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}"
215 rcp | rcp-cli | cli)
218 rcp-ncp | ncp)
219 export NODE_TYPE=ncp-sim
224 export top_builddir_1_3_bbr="${OT_BUILDDIR}/openthread-simulation-1.3-bbr"
226 export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
230 export PYTHONPATH=tests/scripts/thread-cert
232 [[ ! -d tmp ]] || rm -rvf tmp
239 export top_builddir="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}"
242 export top_builddir_1_3_bbr="${OT_BUILDDIR}/openthread-simulation-1.3-bbr"
244 export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
248 export PYTHONPATH=tests/scripts/thread-cert
253 python3 tests/scripts/thread-cert/run_cert_suite.py --multiply "${MULTIPLY:-1}" "$@"
259 echo "Downloading thread-wireshark from https://github.com/openthread/wireshark/releases ..."
260 …rl=https://github.com/openthread/wireshark/releases/download/ot-pktverify-20200727/thread-wireshar…
261 local save_file=/tmp/thread-wireshark.tar.gz
263 rm -rf /tmp/thread-wireshark || true
264 rm -rf "${save_file}" || true
265 curl -L "${download_url}" -o "${save_file}"
266 tar -C /tmp -xvzf "${save_file}"
268 LD_LIBRARY_PATH=/tmp/thread-wireshark /tmp/thread-wireshark/tshark -v
269 LD_LIBRARY_PATH=/tmp/thread-wireshark /tmp/thread-wireshark/dumpcap -v
270 rm -rf "${save_file}"
279 "-DOT_ANYCAST_LOCATOR=ON"
280 "-DOT_COVERAGE=ON"
281 "-DOT_DNS_CLIENT=ON"
282 "-DOT_DUA=ON"
283 "-DOT_MLR=ON"
284 "-DOT_NETDATA_PUBLISHER=ON"
285 "-DOT_SLAAC=ON"
286 "-DOT_SRP_CLIENT=ON"
287 "-DOT_FULL_LOGS=ON"
288 "-DOT_UPTIME=ON"
289 "-DOTBR_DUA_ROUTING=ON"
290 "-DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_DNSSD_SERVER_BIND_UNSPECIFIED_NETIF=1'"
294 otbr_options+=("-DOTBR_TREL=ON")
296 otbr_options+=("-DOTBR_TREL=OFF")
300 otbr_options+=("-DOTBR_BORDER_ROUTING_NAT64=ON")
302 otbr_options+=("-DOTBR_BORDER_ROUTING_NAT64=OFF")
305 local otbr_docker_image=${OTBR_DOCKER_IMAGE:-otbr-ot12-backbone-ci}
307 otbrdir=$(mktemp -d -t otbr_XXXXXX)
311 if [[ -z ${LOCAL_OTBR_DIR} ]]; then
312 … ./script/git-tool clone https://github.com/openthread/ot-br-posix.git --depth 1 "${otbrdir}"
314 cp -r "${LOCAL_OTBR_DIR}"/* "${otbrdir}"
315 rm -rf "${otbrdir}"/build
318 rm -rf third_party/openthread/repo
319 cp -r "${otdir}" third_party/openthread/repo
320 rm -rf .git
321 docker build -t "${otbr_docker_image}" -f etc/docker/Dockerfile . \
322 --build-arg BORDER_ROUTING="${BORDER_ROUTING}" \
323 --build-arg INFRA_IF_NAME=eth0 \
324 --build-arg BACKBONE_ROUTER=1 \
325 --build-arg REFERENCE_DEVICE=1 \
326 --build-arg OT_BACKBONE_CI=1 \
327 --build-arg NAT64="${NAT64}" \
328 --build-arg REST_API=0 \
329 --build-arg WEB_GUI=0 \
330 --build-arg MDNS="${OTBR_MDNS:-mDNSResponder}" \
331 --build-arg OTBR_OPTIONS="${otbr_options[*]}"
334 rm -rf "${otbrdir}"
339 python3 ./tests/scripts/thread-cert/pktverify/verify.py "$1"
347 echo -e "\n${OT_COLOR_PASS}EXEC${OT_COLOR_NONE} ${script}"
348 sudo killall ot-rcp || true
349 sudo killall ot-cli || true
350 sudo killall ot-cli-ftd || true
351 sudo killall ot-cli-mtd || true
352 sudo rm -rf tmp
356 sudo -E expect -df "${script}" 2>"${log_file}"
358 expect -df "${script}" 2>"${log_file}"
363 …# The exit status 77 for skipping is inherited from automake's test driver for script-based testsu…
365 echo -e "\n${OT_COLOR_SKIP}SKIP${OT_COLOR_NONE} ${script}"
368 echo -e "\n${OT_COLOR_FAIL}FAIL${OT_COLOR_NONE} ${script}"
373 echo -e "\n${OT_COLOR_PASS}PASS${OT_COLOR_NONE} ${script}"
386 test_patterns=(-name 'tun-*.exp')
388 test_patterns=(-name 'posix-*.exp' -o -name 'cli-*.exp')
390 test_patterns+=(-o -name 'v1_2-*.exp')
394 test_patterns=(-name 'cli-*.exp' -o -name 'simulation-*.exp')
401 export -f ot_exec_expect_script
403 …s/scripts/expect -type f -perm "$([[ $OSTYPE == darwin* ]] && echo '+' || echo '/')"111 \( "${test…
415 'rcp' or 'rcp-cli' for CLI on POSIX platform.
416 'rcp-ncp' for NCP on POSIX platform.
419 …OT_BUILDDIR The output directory for cmake build. By default the directory is './build'. For e…
420 'OT_BUILDDIR=\${PWD}/my_awesome_build ./script/test clean build'.
421 VERBOSE 1 to build or test verbosely. The default is 0.
425 … INTER_OP 1 to build 1.1 together. Only works when THREAD_VERSION is 1.3. The default is 0.
426 …INTER_OP_BBR 1 to build bbr version together. Only works when THREAD_VERSION is 1.3. The defaul…
429 clean Clean built files to prepare for new build.
430build Build project for running tests. This can be used to rebuild the project for chang…
431 …cert Run a single thread-cert test. ENVIRONMENTS should be the same as those given to b…
432 …cert_suite Run a batch of thread-cert tests and summarize the test results. Only echo logs fo…
439 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
440 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
443 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
444 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
447 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
448 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
451 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
452 VIRTUAL_TIME=0 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
455 …THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_Router…
456 …THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeou…
459 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_test_enhanced_keep_alive.py
460 INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_router_5_1_1.py
461 INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert_suite tests/scripts/thread-cert/v1_2_*
464 $0 clean build expect tests/scripts/expect/cli-log-level.exp
467 $0 clean build expect
475 echo "$OT_COREDUMP_DIR/corefile-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern
476 rm -rf "$OT_COREDUMP_DIR"
477 mkdir -p "$OT_COREDUMP_DIR"
482 mkdir -p "$OT_COREDUMP_DIR/so-lib"
483 cp /lib/x86_64-linux-gnu/libgcc_s.so.1 "$OT_COREDUMP_DIR/so-lib"
484 cp /lib/x86_64-linux-gnu/libc.so.6 "$OT_COREDUMP_DIR/so-lib"
485 cp /lib64/ld-linux-x86-64.so.2 "$OT_COREDUMP_DIR/so-lib"
490 shopt -s nullglob
493 declare -A bin_list=([dummy]='')
495 bin=$(file "$f" | grep -E -o "execfn: '(.*')," | sed -r "s/execfn: '(.*)',/\1/")
503 if [[ $key =~ openthread-(simulation|posix)-([0-9]\.[0-9]) ]]; then
504 … postfix="-$(echo "$key" | sed -r "s/.*openthread-(simulation|posix)-([0-9]\.[0-9]).*/\2/")"
512 [[ ${#bin_list[@]} -gt 1 ]] && (
520 mkdir -p tmp/
522 rm -f tmp/coverage.lcov
525 llvm_gcov="$(mktemp -d)/llvm-gcov"
527 echo 'exec llvm-cov gcov "$@"' >>"$llvm_gcov"
529 lcov --gcov-tool "$llvm_gcov" --directory . --capture --output-file tmp/coverage.info
531 ./script/gcda-tool collect
532 ./script/gcda-tool install
534 lcov --directory . --capture --output-file tmp/coverage.info
536 lcov --list tmp/coverage.info
537 lcov --extract tmp/coverage.info "$PWD/src/core/common/message.cpp" | c++filt
542 ls -R coverage/
544 readarray -d '' files < <(find coverage/ -type f -name 'coverage*.info' -print0)
548 args+=('-a')
551 lcov "${args[@]}" -o final.info
559 …export RADIO_DEVICE="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}/examples/apps/ncp/ot-r…
560 export OT_CLI_PATH="${OT_BUILDDIR}/openthread-posix-${THREAD_VERSION}/src/posix/ot-cli"
563 … export RADIO_DEVICE_1_1="${OT_BUILDDIR}/openthread-simulation-1.1/examples/apps/ncp/ot-rcp"
564 export OT_CLI_PATH_1_1="${OT_BUILDDIR}/openthread-posix-1.1/src/posix/ot-cli"
565 export OT_CLI_PATH_BBR="${OT_BUILDDIR}/openthread-posix-1.3-bbr/src/posix/ot-cli"
569 export OT_SIMULATION_APPS="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}/examples/apps"
570 export OT_POSIX_APPS="${OT_BUILDDIR}/openthread-posix-${THREAD_VERSION}/src/posix"
575 for arg in "$@"; do
576 if [[ $arg == expect ]]; then
590 export -n VERBOSE
594 read -r -a ot_extra_options <<<"${OT_OPTIONS}"
604 if [[ -z ${1:-} ]]; then
616 build)
667 echo -e "${OT_COLOR_FAIL}Warning:${OT_COLOR_NONE} Ignoring: '$1'"