Merge "xci: Log functest output before failure"
authorFatih Degirmenci <fdegir@gmail.com>
Sat, 17 Mar 2018 11:02:15 +0000 (11:02 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Sat, 17 Mar 2018 11:02:15 +0000 (11:02 +0000)
jjb/xci/xci-run-functest.sh

index 60b48cf..2e34363 100755 (executable)
@@ -7,9 +7,7 @@
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
-set -o errexit
 set -o nounset
-set -o pipefail
 
 #----------------------------------------------------------------------
 # This script is used by CI and executed by Jenkins jobs.
@@ -58,3 +56,8 @@ 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