Revert "Remove obsolete ovn4nfv jjbs"
[releng.git] / jjb / ovn4nfv / golang-make-test.sh
1 #!/bin/bash
2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2018 Intel Corporation.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10 set -o errexit
11 set -o pipefail
12
13 source /etc/os-release || source /usr/lib/os-release
14 case ${ID,,} in
15     ubuntu|debian)
16     sudo add-apt-repository -y ppa:longsleep/golang-backports
17     sudo apt-get update
18     sudo apt-get install -y build-essential golang-go
19     sudo apt-get -y clean && sudo apt-get -y autoremove
20     ;;
21 esac
22
23 echo "Running unit tests in Go ${golang_version} ..."
24 cd $WORKSPACE
25 make test