jjb: xci: xci-run-functest.sh: Reload XCI environment for functest 13/55413/2
authorMarkos Chandras <mchandras@suse.de>
Wed, 11 Apr 2018 12:10:43 +0000 (13:10 +0100)
committerFatih Degirmenci <fdegir@gmail.com>
Wed, 11 Apr 2018 12:58:00 +0000 (12:58 +0000)
We should reload the XCI environment before running functest in order to
ensure that playbooks have the correct information from the XCI
deployment.

Change-Id: Ieadeca61d3ea3e504e21aa96945ad067f20d1489
Signed-off-by: Markos Chandras <mchandras@suse.de>
jjb/xci/xci-run-functest.sh

index 83acd60..7fb0be9 100755 (executable)
@@ -44,9 +44,10 @@ if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENT
 fi
 
 # set XCI_VENV for ansible
-export XCI_VENV=/home/devuser/releng-xci/venv
+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; 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; source ${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