Redesign and taking xapp-framework into use
Change-Id: I600f667047ea2a1f946107546c32a3fb7e56b9f3
Signed-off-by: Mohamed Abukar <abukar.mohamed@nokia.com>
diff --git a/build_vesmgr.sh b/build_vesmgr.sh
index c1d2bf3..6166a6a 100755
--- a/build_vesmgr.sh
+++ b/build_vesmgr.sh
@@ -19,16 +19,31 @@
# platform project (RICP).
#
+# Install RMR from deb packages at packagecloud.io
+rmr=rmr_4.1.2_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.1.2_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 ]
@@ -40,7 +55,5 @@
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