diff mbox series

[v12,4/6] shippable: generate code coverage reports

Message ID 1517680813-8247-5-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v12,1/6] shippable: report test results even if ci step failed | expand

Commit Message

Github ODP bot Feb. 3, 2018, 6 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


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: 5865787680be13b47b777e8b0b64646755be41e0
 ** Merge commit sha: 66e28548625461f1cb37ac5dcbd6b1d0a8914187
 **/
 .shippable.yml            | 8 ++++++--
 scripts/Dockerfile        | 1 +
 scripts/shippable-post.sh | 3 +++
 3 files changed, 10 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/.shippable.yml b/.shippable.yml
index d17319e70..045019788 100644
--- a/.shippable.yml
+++ b/.shippable.yml
@@ -6,7 +6,7 @@  compiler:
 
 env:
   matrix:
-    - CONF=""
+    - CONF="--disable-test-perf"
     # - CONF="--disable-abi-compat"
     # - CONF="--enable-schedule-sp"
     # - CONF="--enable-schedule-iquery"
@@ -37,7 +37,11 @@  build:
     - mkdir -p /dev/shm/odp
     - ./bootstrap
     - if [ "${CC#clang}" != "${CC}" ] ; then export CXX="${CC/clang/clang++}"; fi
-    - ./configure --disable-test-perf
+    - if [ "${CC#clang}" = "${CC}" ] ; then
+      ./configure $CONF CFLAGS="-O0 --coverage" CXXFLAGS="-O0 --coverage" LDFLAGS="--coverage" ;
+      else
+      ./configure $CONF ;
+      fi
     - make
     - sudo env ODP_SHM_DIR=/dev/shm/odp ODP_TEST_OUT_XML=yes make check -k
 
diff --git a/scripts/Dockerfile b/scripts/Dockerfile
index 3e1d54dbd..dc4411aa1 100644
--- a/scripts/Dockerfile
+++ b/scripts/Dockerfile
@@ -10,6 +10,7 @@  RUN sudo apt-get update && sudo apt-get install -yy \
   ccache \
   clang-3.8 \
   gcc-4.8 \
+  gcovr \
   graphviz \
   kmod \
   libconfig-dev \
diff --git a/scripts/shippable-post.sh b/scripts/shippable-post.sh
index ed5a44168..9eae06262 100755
--- a/scripts/shippable-post.sh
+++ b/scripts/shippable-post.sh
@@ -7,3 +7,6 @@  for FILE in `find  ./test ./platform/ -name  "*.xml"`; do
 	xsltproc --novalid cunit-to-junit.xsl "$FILE" > \
 		"$SHIPPABLE_BUILD_DIR/shippable/testresults/${bname}"
 done
+
+mkdir -p shippable/codecoverage
+gcovr -r . --xml-pretty --exclude 'test/|.*/test/|example/' -o shippable/codecoverage/coverage.xml