2 # http://www.apache.org/licenses/LICENSE-2.0
4 # Unless required by applicable law or agreed to in writing, software
5 # distributed under the License is distributed on an "AS IS" BASIS,
6 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7 # See the License for the specific language governing permissions and
8 # limitations under the License.
10 # This source code is part of the near-RT RIC (RAN Intelligent Controller)
11 # platform project (RICP).
19 if [ -f ../container-tag.yaml ]
21 tag=$(grep "tag:" ../container-tag.yaml | awk '{print $2}')
26 hash=$(git rev-parse --short HEAD || true)
28 export GOPATH=$HOME/go
29 export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
30 export CFG_FILE=config/config-file.json
31 export RMR_SEED_RT=config/uta_rtg_ut.rt
32 GO111MODULE=on GO_ENABLED=0 GOOS=linux
35 go build -a -installsuffix cgo -ldflags "-X main.Version=$tag -X main.Hash=$hash" -o o1agent ./cmd/o1agent.go
38 go test -v -p 1 -cover -coverprofile cover.out ./pkg/nbi/ -c -o ./nbi_test && ./nbi_test