X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=goversion%2Fbuild-oruclosedloopconsumer-ubuntu.sh;fp=goversion%2Fbuild-oruclosedloopconsumer-ubuntu.sh;h=c59abd761f1fbc12d62c1718fb4c625a6ed02e66;hb=c78feeaed2f5889816e938328646397ae0e18c71;hp=0000000000000000000000000000000000000000;hpb=46a6d054a6efcae4d249efe79a13bccb1b0252fc;p=nonrtric%2Frapp%2Forufhrecovery.git diff --git a/goversion/build-oruclosedloopconsumer-ubuntu.sh b/goversion/build-oruclosedloopconsumer-ubuntu.sh new file mode 100644 index 0000000..c59abd7 --- /dev/null +++ b/goversion/build-oruclosedloopconsumer-ubuntu.sh @@ -0,0 +1,40 @@ +#!/bin/bash +############################################################################## +# +# Copyright (C) 2021: Nordix Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################## +set -eux + +echo "--> build-oruclosedloopconsumer-ubuntu.sh" +curdir=`pwd` +# go installs tools like go-acc to $HOME/go/bin +# ubuntu minion path lacks go +export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin +go version +cd test/usecases/oruclosedlooprecovery/goversion/ + +# install the go coverage tool helper +go get -v github.com/ory/go-acc + +export GO111MODULE=on +go get github.com/stretchr/testify/mock@v1.7.0 + +go-acc ./... --ignore mocks + +sed -i -e 's/oransc\.org\/usecase\/oruclosedloop/test\/usecases\/oruclosedlooprecovery\/goversion/' coverage.txt + +cp coverage.txt $curdir +echo "--> build-oruclosedloopconsumer-ubuntu.sh ends"