xci: Log functest results to console for daily jobs 17/61817/2
authorFatih Degirmenci <fdegir@gmail.com>
Tue, 4 Sep 2018 14:22:06 +0000 (16:22 +0200)
committerFatih Degirmenci <fdegir@gmail.com>
Tue, 4 Sep 2018 14:23:30 +0000 (16:23 +0200)
Change-Id: Ic3f31fea8170af8b1e9845856976ef57df496e1e
Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
jjb/xci/xci-daily-jobs.yaml

index c81b490..cfe7cb1 100644 (file)
     builders:
       - shell: |
           #!/bin/bash
-          set -o errexit
           set -o pipefail
 
           ssh root@192.168.122.2 "/root/run-functest.sh"
+          functest_exit=$?
+
+          case ${DEPLOY_SCENARIO[0]} in
+              os-*)
+                  FUNCTEST_LOG=/root/functest-results/functest.log
+                  ;;
+              k8-*)
+                  FUNCTEST_LOG=/root/functest-results/functest-kubernetes.log
+                  ;;
+              *)
+                  echo "Unable to determine the installer. Exiting!"
+                  exit $functest_exit
+                  ;;
+          esac
+
+          echo "Functest log"
+          echo "---------------------------------------------------------------------------------"
+          ssh root@192.168.122.2 "cat $FUNCTEST_LOG"
+          echo "---------------------------------------------------------------------------------"
+          exit ${functest_exit}
 - builder:
     name: 'xci-daily-yardstick-macro'
     builders: