mirror of
https://github.com/espressif/openthread.git
synced 2026-08-01 08:37:47 +00:00
[docs] add document for running BR tests locally (#7044)
This commit is contained in:
+7
-1
@@ -51,6 +51,7 @@ readonly INTER_OP_BBR="${INTER_OP_BBR:-1}"
|
||||
readonly OT_COREDUMP_DIR="${PWD}/ot-core-dump"
|
||||
readonly FULL_LOGS=${FULL_LOGS:-0}
|
||||
readonly TREL=${TREL:-0}
|
||||
readonly LOCAL_OTBR_DIR=${LOCAL_OTBR_DIR:-""}
|
||||
|
||||
build_simulation()
|
||||
{
|
||||
@@ -296,7 +297,12 @@ do_build_otbr_docker()
|
||||
otdir=$(pwd)
|
||||
|
||||
(
|
||||
./script/git-tool clone https://github.com/openthread/ot-br-posix.git --depth 1 "${otbrdir}"
|
||||
if [[ -z ${LOCAL_OTBR_DIR} ]]; then
|
||||
./script/git-tool clone https://github.com/openthread/ot-br-posix.git --depth 1 "${otbrdir}"
|
||||
else
|
||||
cp -r "${LOCAL_OTBR_DIR}"/* "${otbrdir}"
|
||||
rm -rf "${otbrdir}"/build
|
||||
fi
|
||||
cd "${otbrdir}"
|
||||
rm -rf third_party/openthread/repo
|
||||
cp -r "${otdir}" third_party/openthread/repo
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# OpenThread Border Router Tests
|
||||
|
||||
## Run Border Router (BR) tests locally
|
||||
|
||||
BR tests run in isolated Docker network and containers, so a new OTBR Docker image needs to be created before running these tests:
|
||||
|
||||
```shell
|
||||
# Use root privilege when necessary.
|
||||
|
||||
# Download OpenThread's branch of wireshark. Run this for the first time.
|
||||
./script/test get_thread_wireshark
|
||||
|
||||
# Clear current OpenThread directory (remember to add new source files).
|
||||
git clean -xfd
|
||||
|
||||
# Rebuild the OTBR Docker image if OTBR source code is updated.
|
||||
LOCAL_OTBR_DIR=$HOME/ot-br-posix ./script/test build_otbr_docker
|
||||
|
||||
# Build simulated OpenThread firmware.
|
||||
VIRTUAL_TIME=0 ./script/test build
|
||||
|
||||
# Run the BR tests locally.
|
||||
TEST_CASE=./tests/scripts/thread-cert/border_router/test_advertising_proxy.py
|
||||
VERBOSE=1 PACKET_VERIFICATION=1 VIRTUAL_TIME=0 ./script/test cert_suite ${TEST_CASE}
|
||||
```
|
||||
Reference in New Issue
Block a user