Merge "doctor: adds test result check"
authorRyota Mibu <r-mibu@cq.jp.nec.com>
Mon, 12 Dec 2016 03:30:17 +0000 (03:30 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 12 Dec 2016 03:30:17 +0000 (03:30 +0000)
jjb/doctor/doctor.yml

index 8a0d015..f9ee3de 100644 (file)
     builders:
         - 'functest-suite-builder'
         - shell: |
-            cp $HOME/opnfv/functest/results/{stream}/{project}.log $WORKSPACE/tests/
+            functest_log="$HOME/opnfv/functest/results/{stream}/{project}.log"
+            to_be_archived="$WORKSPACE/tests/functest-{project}.log"
+            cp $functest_log $to_be_archived
+            # NOTE: checking the test result, as the previous job could return
+            #       0 regardless the result of doctor test scenario.
+            grep -e ' OK$' $functest_log || exit 1
 
     publishers:
         - archive: