summaryrefslogtreecommitdiffstats
path: root/jjb/xci/xci-run-functest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/xci/xci-run-functest.sh')
-rwxr-xr-xjjb/xci/xci-run-functest.sh18
1 files changed, 16 insertions, 2 deletions
diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh
index 7fb0be9b9..6d43c9789 100755
--- a/jjb/xci/xci-run-functest.sh
+++ b/jjb/xci/xci-run-functest.sh
@@ -47,13 +47,27 @@ fi
export XCI_PATH=/home/devuser/releng-xci
export XCI_VENV=${XCI_PATH}/venv
-ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "source $XCI_VENV/bin/activate; source ${XCI_PATH}/.cache/xci.env && cd releng-xci/xci && ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml"
+ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "source $XCI_VENV/bin/activate; while read var; do declare -x \"\${var}\" 2>/dev/null; done < ${XCI_PATH}/.cache/xci.env && cd releng-xci/xci && ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml"
echo "Running functest"
ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "/root/run-functest.sh"
# Record exit code
functest_exit=$?
+
+case ${DEPLOY_SCENARIO[0]} in
+ os-*)
+ FUNCTEST_LOG=/root/results/functest.log
+ ;;
+ k8-*)
+ FUNCTEST_LOG=/root/results/functest-kubernetes.log
+ ;;
+ *)
+ echo "Unable to determine the installer. Exiting!"
+ exit 1
+ ;;
+esac
+
echo "Functest log"
echo "---------------------------------------------------------------------------------"
-ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat /root/results/functest.log"
+ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat $FUNCTEST_LOG"
echo "---------------------------------------------------------------------------------"
exit ${functest_exit}