From 0ccfd96c22bce64121911f07009020b37f79754c Mon Sep 17 00:00:00 2001 From: "pengfei.xu" Date: Wed, 8 Jan 2025 17:44:36 -0800 Subject: [PATCH 1/2] update go installation scripts --- dss_s3benchmark/scripts/build.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/dss_s3benchmark/scripts/build.sh b/dss_s3benchmark/scripts/build.sh index f3770de..5bd8acc 100755 --- a/dss_s3benchmark/scripts/build.sh +++ b/dss_s3benchmark/scripts/build.sh @@ -36,9 +36,13 @@ set -e SCRIPT_DIR=$(readlink -f "$(dirname "$0")") DSS_S3BENCHMARK_DIR=$(realpath "$SCRIPT_DIR/..") DSS_ECOSYSTEM_DIR=$(realpath "$DSS_S3BENCHMARK_DIR/..") +GIT_DIR=$(realpath "$DSS_ECOSYSTEM_DIR/..") DSS_SDK_DIR="$DSS_ECOSYSTEM_DIR/../dss-sdk/host_out" LIB_DIR="-L$DSS_SDK_DIR/lib -L$DSS_ECOSYSTEM_DIR/dss_client/build" INCLUDE_DIR="-I$DSS_SDK_DIR/include -I$DSS_ECOSYSTEM_DIR/dss_client/include" +GOVER='1.12' +GOTGZ="go$GOVER.linux-amd64.tar.gz" +GOURL="https://dl.google.com/go/$GOTGZ" # Print a message to console and return non-zero die() @@ -61,17 +65,21 @@ fi export CGO_CFLAGS="-std=gnu99 $INCLUDE_DIR" export CGO_LDFLAGS="$LIB_DIR -lrdmacm -libverbs -ldss -lrdd_cl" export GO111MODULE=off -export GODIR="$DSS_ECOSYSTEM_DIR/go-repos" -export GOPATH="$GODIR" +export GODIR="$GIT_DIR/go_$GOVER" +export GOPKG_DIR="$GODIR/go_repos" export PATH="$PATH:$GODIR/bin" export GOCACHE="$GODIR/cache" -echo 'Downloading go repos' -if [ -d "$GODIR" ]; then - rm -rf "$GODIR" - rm -rf "$GOCACHE" +echo 'Downloading go' +if [ ! -d "$GODIR" ]; then + mkdir "$GODIR" + if [ ! -e "./$GOTGZ" ]; then + wget "$GOURL" --no-check-certificate + fi + tar xzf "$GOTGZ" -C "$GODIR" --strip-components 1 + rm -f "$GOTGZ" fi -mkdir -p "$GODIR" +mkdir -p "$GOPKG_DIR" mkdir -p "$GOCACHE" go get -u github.com/aws/aws-sdk-go/aws/... go get -u github.com/aws/aws-sdk-go/service/... @@ -81,5 +89,5 @@ echo 'Building S3 benchmark' go build -o s3-benchmark s3-benchmark.go echo 'cleaning cache and repos' -rm -rf "$GODIR" +rm -rf "$GOPKG_DIR" rm -rf "$GOCACHE" From e90d9088ee0957bdb9e655e6ef5bfa5bf99d2bcb Mon Sep 17 00:00:00 2001 From: Pengfei Xu <56994864+iso-p@users.noreply.github.com> Date: Thu, 9 Jan 2025 11:16:18 -0800 Subject: [PATCH 2/2] Update pytest.yml --- buildspec/pytest.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildspec/pytest.yml b/buildspec/pytest.yml index 8230eb3..29a854e 100644 --- a/buildspec/pytest.yml +++ b/buildspec/pytest.yml @@ -8,6 +8,9 @@ phases: pre_build: commands: # Install dependencies to execute Datamover unit tests + - sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo + - sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo + - sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo - yum install libcap-devel -y - python3 -m pip install -r dss_datamover/requirements.txt - python3 -m pip install -r dss_datamover/unittests/requirements.txt