diff mbox series

[v13,1/6] shippable: report test results even if ci step failed

Message ID 1518051619-20953-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v13,1/6] shippable: report test results even if ci step failed | expand

Commit Message

Github ODP bot Feb. 8, 2018, 1 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


According to the documentation post_ci is executed only if ci finished
successfully. Move test result reporting to separate script and call it
from on_success and on_failure steps.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 441 (lumag:shippable-ci)
 ** https://github.com/Linaro/odp/pull/441
 ** Patch: https://github.com/Linaro/odp/pull/441.patch
 ** Base sha: 257b08b35ceea41bad5a7f1c626496cf111e657a
 ** Merge commit sha: 223a609fc64a296b12ffa57310c51ace739462bc
 **/
 .shippable.yml            | 10 +++-------
 scripts/shippable-post.sh |  9 +++++++++
 2 files changed, 12 insertions(+), 7 deletions(-)
 create mode 100755 scripts/shippable-post.sh
diff mbox series

Patch

diff --git a/.shippable.yml b/.shippable.yml
index 9bc2cb6f7..35292d983 100644
--- a/.shippable.yml
+++ b/.shippable.yml
@@ -40,14 +40,10 @@  build:
     - make
     - sudo env ODP_SHM_DIR=/dev/shm/odp ODP_TEST_OUT_XML=yes make check
 
-  post_ci:
-    - wget https://raw.githubusercontent.com/shawnliang/cunit-to-junit/master/cunit-to-junit.xsl
-    - |
-      for FILE in `find  ./test ./platform/ -name  "*.xml"`; do
-         bname=`basename $FILE`;
-         xsltproc --novalid cunit-to-junit.xsl $FILE > $SHIPPABLE_BUILD_DIR/shippable/testresults/${bname}
-      done
+  on_success:
+    - ./scripts/shippable-post.sh
 
   on_failure:
+    - ./scripts/shippable-post.sh
     - cat config.log
     - find . -name "*.trs" | xargs grep -l '^.test-result. FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done
diff --git a/scripts/shippable-post.sh b/scripts/shippable-post.sh
new file mode 100755
index 000000000..ed5a44168
--- /dev/null
+++ b/scripts/shippable-post.sh
@@ -0,0 +1,9 @@ 
+#!/bin/sh
+
+wget https://raw.githubusercontent.com/shawnliang/cunit-to-junit/master/cunit-to-junit.xsl
+
+for FILE in `find  ./test ./platform/ -name  "*.xml"`; do
+	bname="`basename $FILE`";
+	xsltproc --novalid cunit-to-junit.xsl "$FILE" > \
+		"$SHIPPABLE_BUILD_DIR/shippable/testresults/${bname}"
+done