diff mbox series

[v8,1/4] shippable: report test results even if ci step failed

Message ID 1517540418-7976-2-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v8,1/4] shippable: report test results even if ci step failed | expand

Commit Message

Github ODP bot Feb. 2, 2018, 3 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: b95ccd3db6eeb7358a877541747e06354429acdd
 ** Merge commit sha: fbf152e21e86dbe76314d60c9287bce9450d3f28
 **/
 .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