X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fovn4nfv%2Fgolang-make-test.sh;fp=jjb%2Fovn4nfv%2Fgolang-make-test.sh;h=7ed4632776f57dff6b9c8b9e9a92c6d87aa2be16;hb=e8aac8f2dc3933b1675072376d6f7cf7e0a13d2b;hp=0000000000000000000000000000000000000000;hpb=0ca2124cb7da285607f58e2926923d27c82491e5;p=releng.git diff --git a/jjb/ovn4nfv/golang-make-test.sh b/jjb/ovn4nfv/golang-make-test.sh new file mode 100644 index 000000000..7ed463277 --- /dev/null +++ b/jjb/ovn4nfv/golang-make-test.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 Intel Corporation. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +set -o errexit +set -o pipefail + +source /etc/os-release || source /usr/lib/os-release +case ${ID,,} in + ubuntu|debian) + sudo add-apt-repository -y ppa:longsleep/golang-backports + sudo apt-get update + sudo apt-get install -y build-essential golang-go + sudo apt-get -y clean && sudo apt-get -y autoremove + ;; +esac + +echo "Running unit tests in Go ${golang_version} ..." +cd $WORKSPACE +make test