[harness-simulation] fix build_docker_image.sh error (#8072)

This commit is contained in:
Jiachen Dong
2022-08-24 10:53:11 -07:00
committed by GitHub
parent e51941177f
commit 0f10480ed6
2 changed files with 6 additions and 8 deletions
@@ -31,13 +31,8 @@
set -euxo pipefail
if [[ $OT_PATH == "" ]]; then
OT_PATH="/home/pi/repo/openthread"
fi
if [[ $OTBR_DOCKER_IMAGE == "" ]]; then
OTBR_DOCKER_IMAGE="otbr-reference-device-1.2"
fi
OT_PATH=${OT_PATH:-"/home/pi/repo/openthread"}
OTBR_DOCKER_IMAGE=${OTBR_DOCKER_IMAGE:-"otbr-reference-device-1.2"}
DOCKER_BUILD_OTBR_OPTIONS=(
"-DOTBR_DUA_ROUTING=ON"
@@ -73,7 +68,7 @@ ETC_PATH="${OT_PATH}/tools/harness-simulation/posix/etc"
--build-arg WEB_GUI=0 \
--build-arg REST_API=0 \
--build-arg EXTERNAL_COMMISSIONER=1 \
--build-arg OTBR_OPTIONS="'${DOCKER_BUILD_OTBR_OPTIONS[*]}'"
--build-arg OTBR_OPTIONS="${DOCKER_BUILD_OTBR_OPTIONS[*]}"
)
rm -rf ot-br-posix
@@ -193,6 +193,9 @@ def main():
for i in range(args.sniffer_num):
sniffer_procs.append(start_sniffer(addr, i + SNIFFER_SERVER_PORT_BASE))
# OTBR firewall scripts create rules inside the Docker container
# Run modprobe to load the kernel modules for iptables
subprocess.run(['sudo', 'modprobe', 'ip6table_filter'])
# Start the BRs
otbr_dockers = []
for nodeid in range(args.ot_num + 1, args.ot_num + args.otbr_num + 1):