diff options
Diffstat (limited to 'jjb/ovn4nfv/golang-make-test.sh')
-rw-r--r-- | jjb/ovn4nfv/golang-make-test.sh | 25 |
1 files changed, 25 insertions, 0 deletions
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 |