From 5edb3e36ce911e0e8a24eb66d988971e7717a96c Mon Sep 17 00:00:00 2001 From: frtabu <francois.taburet@nokia-bell-labs.com> Date: Tue, 13 Aug 2019 16:19:44 +0200 Subject: [PATCH] add ci platform specific script support in oai-vm-tools --- ci-scripts/oai-ci-vm-tool | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ci-scripts/oai-ci-vm-tool b/ci-scripts/oai-ci-vm-tool index 4c89c32a8d2..3fb4a7ee60a 100755 --- a/ci-scripts/oai-ci-vm-tool +++ b/ci-scripts/oai-ci-vm-tool @@ -140,6 +140,19 @@ function command_options_usage { echo "" } +# function to set specific behavior depending on the TESTPLATFORM_OWNER variable +# which may be set by a jenkins server for exemple +function platform_set { + if [ "$TESTPLATFORM_OWNER" != "" ] + then + echo "Running on $TESTPLATFORM_OWNER platform" + if [ -x "${TESTPLATFORM_OWNER}_setenv.sh" ] + then + . ${TESTPLATFORM_OWNER}_setenv.sh + fi + fi +} + function setvar_usage { declare -A HELP_VAR HELP_VAR["VM_OSREL"]="OS release to use in virtual machines" @@ -315,6 +328,7 @@ function check_setvar { exit 1 } +platform_set MY_DIR=$(dirname $(readlink -f $0)) . $MY_DIR/createVM.sh . $MY_DIR/buildOnVM.sh @@ -324,6 +338,7 @@ MY_DIR=$(dirname $(readlink -f $0)) . $MY_DIR/reportBuildLocally.sh . $MY_DIR/reportTestLocally.sh + if [ $# -lt 1 ] then echo "Syntax Error: too few arguments" -- GitLab