From b0d627deb61ef6f6f9381c2e83401853da3999f7 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 12 Apr 2018 16:14:19 +0100 Subject: jjb: xci: xci-run-functest: Escape the 'var' variable Commit 33073c5a3426c1867411db446bc9e5d84d2a7747 ("jjb: xci: xci-run-functest.sh: Ensure env vars are quoted during reload") added support for reloading the OPNFV host environment in a safe way but that didn't work because the internal '$var' variable was not escaped so it was evaluated on the local host instead of the remote one. This fixes the problem by properly escaping the variable. Change-Id: I7c90ae18f77aca076579f70c7c0e9a72aaaad7c8 Signed-off-by: Markos Chandras --- jjb/xci/xci-run-functest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh index fad2d7bbe..6d43c9789 100755 --- a/jjb/xci/xci-run-functest.sh +++ b/jjb/xci/xci-run-functest.sh @@ -47,7 +47,7 @@ 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; 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" +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 -- cgit 1.2.3-korg