export OPENSTACK_TOPO
}
+function get_test_suites() {
+
+ #let the caller pick the name of the variable we will assign the suites to
+ local __suite_list=$1
+
+ 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
+ suite_list=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '`
+ else
+ suite_list=""
+ workpath="${WORKSPACE}/test/csit/suites"
+ for suite in ${SUITES}; do
+ fullsuite="${workpath}/${suite}"
+ if [ -z "${suite_list}" ]; then
+ suite_list+=${fullsuite}
+ else
+ suite_list+=" "${fullsuite}
+ fi
+ done
+ fi
+
+ eval $__suite_list="'$suite_list'"
+}
+
function run_plan() {
local -r type=$1
# Ensure we fail the job if any steps fail.
set -ex -o pipefail
+print_job_parameters
+
get_os_deploy
# Swap out the ODL distribution
ssh ${OPENSTACK_COMPUTE_NODE_1_IP} "sudo ovs-vsctl show"
ssh ${OPENSTACK_COMPUTE_NODE_2_IP} "sudo ovs-vsctl show"
-# 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} ..."
# please add pybot -v arguments on a single line and alphabetized
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} \
HA_PROXY_3_IP=${ODL_SYSTEM_3_IP}
fi
-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
#install all client versions required for this job testing
install_openstack_clients_in_robot_vm
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} \