blob: ca04a809dc66adf3b62558b0bec205f0b680860b [file] [log] [blame]
ychacon5542d262022-02-21 14:40:38 +01001#!/bin/bash
2##############################################################################
3#
4# Copyright (C) 2021: Nordix Foundation
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18##############################################################################
19set -eux
20
21echo "--> build-ransliceassurance-ubuntu.sh"
ychacon5542d262022-02-21 14:40:38 +010022# go installs tools like go-acc to $HOME/go/bin
23# ubuntu minion path lacks go
24export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
elinuxhenrik4f0b6a92022-10-21 16:33:28 +020025export GO111MODULE=on
ychacon5542d262022-02-21 14:40:38 +010026go version
27cd smoversion/
28
29# install the go coverage tool helper
elinuxhenrik4f0b6a92022-10-21 16:33:28 +020030go install github.com/ory/go-acc
ychacon5542d262022-02-21 14:40:38 +010031
ychacon5542d262022-02-21 14:40:38 +010032go get github.com/stretchr/testify/mock@v1.7.0
33
34go-acc ./... --ignore mocks
35
36sed -i -e 's/oransc\.org\/usecase\/oduclosedloop/smoversion/' coverage.txt
37
ychacon5542d262022-02-21 14:40:38 +010038echo "--> build-ransliceassurance-ubuntu.sh ends"