X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-deploy-controller-run-test.sh;h=788da938b0c3a20b7220d502fc7bd62c57ce1d28;hb=93a5304ef04620630cbd6de14694607048bf2aa3;hp=9fc28a881875a65597efdcb7d9c778bd5521bdac;hpb=26434d2a05867a38a3e48cb85f5ec03bdc515008;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-deploy-controller-run-test.sh b/jjb/integration/integration-deploy-controller-run-test.sh index 9fc28a881..788da938b 100755 --- a/jjb/integration/integration-deploy-controller-run-test.sh +++ b/jjb/integration/integration-deploy-controller-run-test.sh @@ -6,241 +6,32 @@ source ${ROBOT_VENV}/bin/activate source /tmp/common-functions.sh ${BUNDLEFOLDER} -if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then - echo "Configure cluster" - AKKACONF=/tmp/${BUNDLEFOLDER}/configuration/initial/akka.conf - MODULESCONF=/tmp/${BUNDLEFOLDER}/configuration/initial/modules.conf - MODULESHARDSCONF=/tmp/${BUNDLEFOLDER}/configuration/initial/module-shards.conf -fi - -if [ ${CONTROLLERSCOPE} == 'all' ]; then - ACTUALFEATURES="odl-integration-compatible-with-all,${CONTROLLERFEATURES}" - export CONTROLLERMEM="3072m" -else - ACTUALFEATURES="odl-infrautils-ready,${CONTROLLERFEATURES}" -fi +echo "#################################################" +echo "## Configure Cluster and Start ##" +echo "#################################################" -# Some versions of jenkins job builder result in feature list containing spaces -# and ending in newline. Remove all that. -ACTUALFEATURES=`echo "${ACTUALFEATURES}" | tr -d '\n \r'` -echo "ACTUALFEATURES: ${ACTUALFEATURES}" +get_features -# In the case that we want to install features via karaf shell, a space separated list of -# ACTUALFEATURES IS NEEDED -SPACE_SEPARATED_FEATURES=$(echo "${ACTUALFEATURES}" | tr ',' ' ') -echo "SPACE_SEPARATED_FEATURES: ${SPACE_SEPARATED_FEATURES}" +# shellcheck disable=SC2034 +nodes_list=$(get_nodes_list) run_plan "script" -cat > ${WORKSPACE}/configuration-script.sh < ${WORKSPACE}/configuration-script.sh < ${WORKSPACE}/startup-script.sh < ${WORKSPACE}/startup-script.sh < ${WORKSPACE}/post-startup-script.sh < ${WORKSPACE}/post-startup-script.sh < ${WORKSPACE}/ps_before.log - pid=$(grep org.apache.karaf.main.Main ${WORKSPACE}/ps_before.log | grep -v grep | tr -s ' ' | cut -f2 -d' ') - echo "karaf main: org.apache.karaf.main.Main, pid:${pid}" - ssh ${!CONTROLLERIP} "${JAVA_HOME}/bin/jstack -l ${pid}" > ${WORKSPACE}/karaf_${i}_${pid}_threads_before.log || true -done +create_controller_variables if [ ${NUM_OPENSTACK_SYSTEM} -gt 0 ]; then echo "Exiting without running tests to deploy openstack for testing" @@ -254,40 +45,18 @@ do tools_variables=${tools_variables}" -v ${MININETIP}:${!MININETIP}" done -echo "Locating test plan to use..." -testplan_filepath="${WORKSPACE}/test/csit/testplans/${STREAMTESTPLAN}" -if [ ! -f "${testplan_filepath}" ]; then - testplan_filepath="${WORKSPACE}/test/csit/testplans/${TESTPLAN}" -fi - -echo "Changing the testplan path..." -cat "${testplan_filepath}" | sed "s:integration:${WORKSPACE}:" > testplan.txt -cat testplan.txt - -# Use the testplan if specific SUITES are not defined. -if [ -z "${SUITES}" ]; then - SUITES=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '` -else - newsuites="" - workpath="${WORKSPACE}/test/csit/suites" - for suite in ${SUITES}; do - fullsuite="${workpath}/${suite}" - if [ -z "${newsuites}" ]; then - newsuites+=${fullsuite} - else - newsuites+=" "${fullsuite} - fi - done - SUITES=${newsuites} -fi +get_test_suites SUITES echo "Starting Robot test suites ${SUITES} ..." -pybot -N ${TESTPLAN} \ +robot -N ${TESTPLAN} \ --removekeywords wuks -c critical -e exclude -e skip_if_${DISTROSTREAM} \ -v BUNDLEFOLDER:${BUNDLEFOLDER} \ -v BUNDLE_URL:${ACTUAL_BUNDLE_URL} \ -v CONTROLLER:${ODL_SYSTEM_IP} \ -v CONTROLLER_USER:${USER} \ + -v GERRIT_BRANCH:${GERRIT_BRANCH} \ + -v GERRIT_PROJECT:${GERRIT_PROJECT} \ + -v GERRIT_REFSPEC:${GERRIT_REFSPEC} \ -v JAVA_HOME:${JAVA_HOME} \ -v JDKVERSION:${JDKVERSION} \ -v JENKINS_WORKSPACE:${WORKSPACE} \