X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=test%2Fbasictest.sh;h=3b2b35355b45768a36f9a69aa41881261107a7e3;hb=refs%2Fchanges%2F73%2F873%2F2;hp=ba6cd97a0fa75631d99d08ba772e9d1917bee4bf;hpb=06ac4cc594385037ee5369e86dd62ab1a00df8e6;p=osm%2FRO.git diff --git a/test/basictest.sh b/test/basictest.sh index ba6cd97a..3b2b3535 100755 --- a/test/basictest.sh +++ b/test/basictest.sh @@ -39,6 +39,7 @@ function usage(){ echo -e " --screen forces to run openmano (and openvim) service in a screen" echo -e " --insert-bashrc insert the created tenant,datacenter variables at" echo -e " ~/.bashrc to be available by openmano CLI" + echo -e " --install-openvim install openvim in test mode" echo -e " --init-openvim if openvim runs locally, an init is called to clean openvim" echo -e " database and add fake hosts" } @@ -57,7 +58,7 @@ DIRscript=${DIRmano}/scripts #process options -source ${DIRscript}/get-options.sh "force:f help:h insert-bashrc init-openvim screen" $* || $_exit 1 +source ${DIRscript}/get-options.sh "force:f help:h insert-bashrc init-openvim install-openvim screen" $* || $_exit 1 #help [ -n "$option_help" ] && usage && $_exit 0 @@ -88,6 +89,22 @@ export OPENMANO_PORT=9090 #by default action should be reset and create [[ -z $action_list ]] && action_list="reset create delete" + +if [[ -n "$option_install_openvim" ]] +then + mkdir -p ${DIRNAME}/local + pushd ${DIRNAME}/local + echo "installing openvim at ${DIRNAME}/openvim ... " + wget -O install-openvim.sh "https://osm.etsi.org/gitweb/?p=osm/openvim.git;a=blob_plain;f=scripts/install-openvim.sh" + chmod +x install-openvim.sh + sudo ./install-openvim.sh --no-install-packages --force --quiet --develop + export alias initopenvim="${PWD}/openvim/scripts/initopenvim.sh" + export alias openvim="${PWD}/openvim/scripts/openvim" + option_init_openvim="" + ${DIRNAME}/local/openvim/scripts/initopenvim.sh${force_param}${insert_bashrc_param}${screen_vim_param} || echo "WARNING openvim cannot be initialized. The rest of test can fail!" + + popd +fi [[ -z "$option_init_openvim" ]] || initopenvim${force_param}${insert_bashrc_param}${screen_vim_param} || echo "WARNING openvim cannot be initialized. The rest of test can fail!" #check openvim client variables are set