summaryrefslogtreecommitdiffstats
path: root/jjb/xci
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-04-06 15:08:33 +0100
committerMarkos Chandras <mchandras@suse.de>2018-04-06 15:08:33 +0100
commite876599edaaa4ab25a8f4160ef9dc7b3cc97b62f (patch)
tree76c05ac2ab2ba40453d50f614ddf15132cd21000 /jjb/xci
parentaa362e7b865f463cce253cd321d68aced919c2b6 (diff)
jjb: xci: Fix functest exit code
There is not reason to grep the logs for failures because we can simply preserve the functest exit code and use that to determine whether the job passed or not. Change-Id: I9f027960fd3d9d452d417b95e9dac66bbb314a47 Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'jjb/xci')
-rwxr-xr-xjjb/xci/xci-run-functest.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh
index aa98e07aa..78b7d442c 100755
--- a/jjb/xci/xci-run-functest.sh
+++ b/jjb/xci/xci-run-functest.sh
@@ -55,12 +55,10 @@ export XCI_VENV=/home/devuser/releng-xci/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"
echo "Running functest"
ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "/root/run-functest.sh"
+# Record exit code
+functest_exit=$?
echo "Functest log"
echo "---------------------------------------------------------------------------------"
ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat /root/results/functest.log"
echo "---------------------------------------------------------------------------------"
-# check the log to see if we have any error
-if ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "grep -q 'FAIL' /root/results/functest.log"; then
- echo "Error: Functest failed!"
- exit 1
-fi
+exit ${functest_exit}