Skip to content

Commit

Permalink
[Hotfix] Fix ot-br-posix crash in cirque (#24773)
Browse files Browse the repository at this point in the history
* [Hotfix] Fix ot-br-posix crash in cirque

* Restyled by shellharden

* Fix

* Update ot-br-posix for mDNS Responder source name

* Specify infra interface when starting ot-br-agent

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
erjiaqing and restyled-commits authored Feb 1, 2023
1 parent 8dc9323 commit 25df49b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def CommandFactory(args):

def ServerMain(args):
extraOptions = {
"otbr-agent": ShellCommand(["otbr-agent", "-I", "wpan0", "spinel+hdlc+uart:///dev/ttyUSB0"])
"otbr-agent": ShellCommand(["otbr-agent", "-I", "wpan0", "-B", "eth0", "spinel+hdlc+uart:///dev/ttyUSB0"])
}

with Listener(SERVER_ADDRESS) as listener:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@
# This script expects to find a Dockerfile next to $0, so symlink
# in an image name directory is the expected use case.

me=$(basename "$0")
cd "$(dirname "$0")"
set -xe

SOURCE=${BASH_SOURCE[0]}
cd "$(dirname "$SOURCE")"

SOURCE_DIR=$PWD

ORG=${DOCKER_BUILD_ORG:-connectedhomeip}

Expand All @@ -35,6 +39,13 @@ VERSION=${DOCKER_BUILD_VERSION:-$(sed 's/ .*//' version)}

GITHUB_ACTION_RUN=${GITHUB_ACTION_RUN:-"0"}

REPO_DIR="$SOURCE_DIR/../../../../"

if [[ "x$GITHUB_ACTION_RUN" = "x1" ]]; then
# Note: This script will be invoked in docker on CI, We should ensure CHIP repo to safe directory to silent git error messages.
git config --global --add safe.directory /home/runner/work/connectedhomeip/connectedhomeip
fi

# The image build will clone its own ot-br-posix checkout due to limitations of git submodule.
# Using the same ot-br-posix version as chip
OT_BR_POSIX=$REPO_DIR/third_party/ot-br-posix/repo
Expand Down Expand Up @@ -85,10 +96,6 @@ else
fi
fi

SOURCE=${BASH_SOURCE[0]}
SOURCE_DIR=$(cd "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)
REPO_DIR="$SOURCE_DIR/../../../../"

docker build -t "$ORG/$IMAGE" -f "$SOURCE_DIR/Dockerfile" "${BUILD_ARGS[@]}" --build-arg OT_BR_POSIX_CHECKOUT="$OT_BR_POSIX_CHECKOUT" "$SOURCE_DIR"

if [[ -n GITHUB_ACTION_RUN ]]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
me=$(basename "$0")
cd "$(dirname "$0")"

SOURCE=${BASH_SOURCE[0]}
SOURCE_DIR=$(cd "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)
REPO_DIR="$SOURCE_DIR/../../../../"

# The image build will clone its own ot-br-posix checkout due to limitations of git submodule.
# Using the same ot-br-posix version as chip
OT_BR_POSIX=$REPO_DIR/third_party/ot-br-posix/repo
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.20
0.4.21
5 changes: 5 additions & 0 deletions scripts/tests/cirque_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ function cirquetest_bootstrap() {

make NO_GRPC=1 install -j

if [[ "x$GITHUB_ACTION_RUN" = "x1" ]]; then
# Note: This script will be invoked in docker on CI, We should add CHIP repo to safe directory to silent git error messages.
git config --global --add safe.directory /home/runner/work/connectedhomeip/connectedhomeip
fi

"$REPO_DIR"/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh

__cirquetest_build_ot_lazy
Expand Down
2 changes: 1 addition & 1 deletion third_party/ot-br-posix/repo
Submodule repo updated 177 files

0 comments on commit 25df49b

Please sign in to comment.