Skip to content

Commit

Permalink
[test] fix socat version to 1.7.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Irving-cl committed Feb 11, 2025
1 parent 6c04545 commit aa37528
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/border_router.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ jobs:
if: ${{ success() && steps.check_cache_result.outputs.cache-hit != 'true' }}
run: |
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
sudo apt-get --no-install-recommends install -y python3-setuptools python3-wheel ninja-build socat nodejs npm
sudo apt-get --no-install-recommends install -y python3-setuptools python3-wheel ninja-build nodejs npm
python3 -m pip install -r third_party/openthread/repo/tests/scripts/thread-cert/requirements.txt
sudo bash tests/scritpts/install_socat
- name: Build OpenThread
if: ${{ success() && steps.check_cache_result.outputs.cache-hit != 'true' }}
run: |
Expand Down
7 changes: 3 additions & 4 deletions tests/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ install_common_dependencies()
coreutils \
git \
libprotobuf-dev \
protobuf-compiler \
socat
protobuf-compiler

sudo bash tests/scripts/install_socat
}

install_openthread_binraries()
Expand All @@ -82,8 +83,6 @@ install_openthread_binraries()
cmake .. -GNinja -DOT_PLATFORM=simulation -DOT_FULL_LOGS=1 -DOT_COMMISSIONER=ON -DOT_JOINER=ON
ninja
sudo ninja install

sudo apt-get install --no-install-recommends -y socat
}

configure_network()
Expand Down
40 changes: 40 additions & 0 deletions tests/scripts/install_socat
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
#
# Copyright (c) 2025, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#

set -euxo pipefail

TOOLS_HOME="$HOME"/.cache/tools
[[ -d $TOOLS_HOME ]] || mkdir -p "$TOOLS_HOME"
SOCAT="socat-1.7.4.4"
SOCAT_TAR="$SOCAT.tar.gz"

cd "$TOOLS_HOME"
[[ -f $SOCAT_TAR ]] || wget http://www.dest-unreach.org/socat/download/socat-1.7.4.4.tar.gz
tar -xvzf "$SOCAT_TAR"
cd "$SOCAT" && ./configure --prefix=/usr && make && sudo make install

0 comments on commit aa37528

Please sign in to comment.