X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fbuild-e2mgr-ubuntu.sh;h=da3396ab25c135187515646d2a6468eec8cd33d5;hb=514e6041ca6b9b92cb887c941767f298a746e315;hp=693ca847d17a1c2ddca3f687eef4a5a0003f32a6;hpb=b23d04b0a9b31a525ecb3a55dacb6c22008339e1;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/build-e2mgr-ubuntu.sh b/E2Manager/build-e2mgr-ubuntu.sh index 693ca84..da3396a 100755 --- a/E2Manager/build-e2mgr-ubuntu.sh +++ b/E2Manager/build-e2mgr-ubuntu.sh @@ -20,42 +20,24 @@ # Installs libraries and builds E2 manager # Prerequisites: # Debian distro; e.g., Ubuntu -# cmake (version?) -# gcc/g++ compiler (version?) -# golang (go), tested with version 1.12.0 +# NNG shared library +# golang (go); tested with version 1.12 # current working directory is E2Manager # running with sudo privs, which is default in Docker -# TODO: -# 1) drop go from $PATH when build minion is extended -# 2) drop rewrite of path prefix when SonarScanner is extended - # Stop at first error and be verbose set -eux echo "--> e2mgr-build-ubuntu.sh" -# Build and install NNG, which requires ninja -apt-get install ninja-build -git clone https://github.com/nanomsg/nng.git \ - && cd nng \ - && git checkout e618abf8f3db2a94269a79c8901a51148d48fcc2 \ - && mkdir build \ - && cd build \ - && cmake -DBUILD_SHARED_LIBS=1 -G Ninja .. \ - && ninja \ - && ninja install \ - && cd ../.. \ - && rm -r nng - # Install RMR from deb packages at packagecloud.io -rmr=rmr_1.13.0_amd64.deb +rmr=rmr_3.6.2_amd64.deb wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/$rmr/download.deb -dpkg -i $rmr +sudo dpkg -i $rmr rm $rmr -rmrdev=rmr-dev_1.13.0_amd64.deb +rmrdev=rmr-dev_3.6.2_amd64.deb wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/$rmrdev/download.deb -dpkg -i $rmrdev +sudo dpkg -i $rmrdev rm $rmrdev # required to find nng and rmr libs @@ -69,25 +51,31 @@ export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin go get -v github.com/ory/go-acc cd 3rdparty/asn1codec \ + && make clobber \ && make \ && cd ../.. go build -v app/main.go # Execute UT and measure coverage -# cgocheck=2 enables expensive checks that should not miss any errors, but will cause your program to run slower. -# clobberfree=1 causes the garbage collector to clobber the memory content of an object with bad content when it frees the object. -# gcstoptheworld=1 disables concurrent garbage collection, making every garbage collection a stop-the-world event. -# Setting gcstoptheworld=2 also disables concurrent sweeping after the garbage collection finishes. -# Setting allocfreetrace=1 causes every allocation to be profiled and a stack trace printed on each object's allocation and free. +# cgocheck=2 enables expensive checks that should not miss any errors, +# but will cause your program to run slower. +# clobberfree=1 causes the garbage collector to clobber the memory content +# of an object with bad content when it frees the object. +# gcstoptheworld=1 disables concurrent garbage collection, making every +# garbage collection a stop-the-world event. +# Setting gcstoptheworld=2 also disables concurrent sweeping after the +# garbage collection finishes. +# Setting allocfreetrace=1 causes every allocation to be profiled and a +# stack trace printed on each object's allocation and free. export GODEBUG=cgocheck=2,clobberfree=1,gcstoptheworld=2,allocfreetrace=0 -export RIC_ID="bbbccc-abcd0e/20" # Static route table is provided in git repo export RMR_SEED_RT=$(pwd)/router_test.txt # writes to coverage.txt by default # SonarCloud accepts the text format go-acc $(go list ./... | grep -vE '(/mocks|/tests|/e2managererrors|/enums)' ) +# TODO: drop rewrite of path prefix when SonarScanner is extended # rewrite the module name to a directory name in the coverage report # https://jira.sonarsource.com/browse/SONARSLANG-450 sed -i -e 's/^e2mgr/E2Manager/' coverage.txt