doctor: adds test result check 03/25703/1
authorRyota MIBU <r-mibu@cq.jp.nec.com>
Fri, 9 Dec 2016 03:42:58 +0000 (22:42 -0500)
committerRyota MIBU <r-mibu@cq.jp.nec.com>
Fri, 9 Dec 2016 03:44:02 +0000 (22:44 -0500)
Change-Id: Id43d0434e4215c265a669505973ccea012741da6
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
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: