X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=build_vesmgr.sh;h=b0fd558e79a5f40bf9b81caf27996437ad406a96;hb=HEAD;hp=61a63fea46d1dabd59f5d14281d9da962166e252;hpb=364295fa6c8aa7b0aec4efe8ae8ce8241d03966c;p=ric-plt%2Fvespamgr.git diff --git a/build_vesmgr.sh b/build_vesmgr.sh index 61a63fe..b0fd558 100755 --- a/build_vesmgr.sh +++ b/build_vesmgr.sh @@ -15,16 +15,35 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# This source code is part of the near-RT RIC (RAN Intelligent Controller) +# platform project (RICP). +# + +# Install RMR from deb packages at packagecloud.io +rmr=rmr_4.8.0_amd64.deb +wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/$rmr/download.deb +sudo dpkg -i $rmr +rm $rmr +rmrdev=rmr-dev_4.8.0_amd64.deb +wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/$rmrdev/download.deb +sudo dpkg -i $rmrdev +rm $rmrdev -set -e -set -x -# Load modules -GO111MODULE=on go mod download +# Required to find nng and rmr libs +export LD_LIBRARY_PATH=/usr/local/lib + +# Go install, build, etc export GOPATH=$HOME/go -export PATH=$GOPATH/bin:$GOROOT/bin:$PATH +export PATH=$GOPATH/bin:$PATH + +# xApp-framework stuff +export CFG_FILE=$PWD/config/config-file-ut.json +export RMR_SEED_RT=$PWD/config/uta_rtg.rt + +GO111MODULE=on GO_ENABLED=0 GOOS=linux # Run vesmgr UT -go test ./... +GO111MODULE=on go test -v -p 1 -cover -coverprofile=coverage.out ./... # setup version tag if [ -f container-tag.yaml ] @@ -36,7 +55,5 @@ fi hash=$(git rev-parse --short HEAD || true) -# Install vesmgr -go install -ldflags "-X main.Version=$tag -X main.Hash=$hash" -v ./cmd/vesmgr - - +# Install vespamgr +go install -ldflags "-X main.Version=$tag -X main.Hash=$hash" -v $PWD/cmd/vespamgr