summaryrefslogtreecommitdiffstats
path: root/jjb/functest
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/functest')
-rw-r--r--jjb/functest/functest-ci-jobs.yml11
-rwxr-xr-xjjb/functest/functest-suite.sh27
-rwxr-xr-xjjb/functest/set-functest-env.sh34
3 files changed, 40 insertions, 32 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 49901bea2..e85144c92 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -113,6 +113,15 @@
slave-label: armband-virtual
installer: fuel
<<: *danube
+# daisy CI PODs
+ - daisy-baremetal:
+ slave-label: daisy-baremetal
+ installer: daisy
+ <<: *master
+ - daisy-virtual:
+ slave-label: daisy-virtual
+ installer: daisy
+ <<: *master
# netvirt 3rd party ci
- virtual:
slave-label: odl-netvirt-virtual
@@ -347,8 +356,6 @@
- 'functest-cleanup'
- 'set-functest-env'
- 'functest-suite'
- - 'functest-store-results'
- - 'functest-exit'
- builder:
name: functest-daily
diff --git a/jjb/functest/functest-suite.sh b/jjb/functest/functest-suite.sh
index f28d3d037..228cc3da4 100755
--- a/jjb/functest/functest-suite.sh
+++ b/jjb/functest/functest-suite.sh
@@ -1,19 +1,18 @@
#!/bin/bash
-set -e
-echo "Functest: run $FUNCTEST_SUITE_NAME on branch $BRANCH"
-if [[ "$BRANCH" =~ 'brahmaputra' ]]; then
- cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME"
-elif [[ "$BRANCH" =~ 'colorado' ]]; then
- cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t $FUNCTEST_SUITE_NAME"
-else
- cmd="functest testcase run $FUNCTEST_SUITE_NAME"
-fi
container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
-docker exec $container_id $cmd
+if [ -z $container_id ]; then
+ echo "Functest container not found"
+ exit 1
+fi
+
+global_ret_val=0
-ret_value=$?
-ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value"
-echo ${ret_value}>${ret_val_file}
+tests=($(echo $FUNCTEST_SUITE_NAME | tr "," "\n"))
+for test in ${tests[@]}; do
+ cmd="python /home/opnfv/repos/functest/functest/ci/run_tests.py -t $test"
+ docker exec $container_id $cmd
+ let global_ret_val+=$?
+done
-exit 0
+exit $global_ret_val
diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh
index abec480dc..05e3d5792 100755
--- a/jjb/functest/set-functest-env.sh
+++ b/jjb/functest/set-functest-env.sh
@@ -17,32 +17,34 @@ if [[ ${RC_FILE_PATH} != '' ]] && [[ -f ${RC_FILE_PATH} ]] ; then
echo "Credentials file detected: ${RC_FILE_PATH}"
# volume if credentials file path is given to Functest
rc_file_vol="-v ${RC_FILE_PATH}:/home/opnfv/functest/conf/openstack.creds"
+ RC_FLAG=1
fi
if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
- if sudo virsh list | grep instack; then
- instack_mac=$(sudo virsh domiflist instack | grep default | \
- grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
- elif sudo virsh list | grep undercloud; then
- instack_mac=$(sudo virsh domiflist undercloud | grep default | \
+ if sudo virsh list | grep undercloud; then
+ echo "Installer VM detected"
+ undercloud_mac=$(sudo virsh domiflist undercloud | grep default | \
grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
+ INSTALLER_IP=$(/usr/sbin/arp -e | grep ${undercloud_mac} | awk {'print $1'})
+ sshkey_vol="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
+ sudo scp $ssh_options root@${INSTALLER_IP}:/home/stack/stackrc ${HOME}/stackrc
+ stackrc_vol="-v ${HOME}/stackrc:/home/opnfv/functest/conf/stackrc"
+
+ if sudo iptables -C FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
+ sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
+ fi
+ if sudo iptables -C FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
+ sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
+ fi
+ elif [[ "$RC_FLAG" == 1 ]]; then
+ echo "No available installer VM, but credentials provided...continuing"
else
- echo "No available installer VM exists...exiting"
+ echo "No available installer VM exists and no credentials provided...exiting"
exit 1
fi
- INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
- sshkey_vol="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
- sudo scp $ssh_options root@${INSTALLER_IP}:/home/stack/stackrc ${HOME}/stackrc
- stackrc_vol="-v ${HOME}/stackrc:/home/opnfv/functest/conf/stackrc"
- if sudo iptables -C FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
- sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
- fi
- if sudo iptables -C FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
- sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
- fi
fi