ci: generate code coverage report
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
262e4a4b8b
commit
be1d409f67
1 changed files with 9 additions and 2 deletions
|
@ -28,6 +28,7 @@ build:
|
||||||
options: "-e HOME=/home/buildslave --privileged=true --tty --net=bridge --user buildslave"
|
options: "-e HOME=/home/buildslave --privileged=true --tty --net=bridge --user buildslave"
|
||||||
|
|
||||||
ci:
|
ci:
|
||||||
|
- sudo apt-get install gcovr gcc-6-multilib
|
||||||
- export CCACHE_DIR=${SHIPPABLE_BUILD_DIR}/ccache/.ccache
|
- export CCACHE_DIR=${SHIPPABLE_BUILD_DIR}/ccache/.ccache
|
||||||
- >
|
- >
|
||||||
if [ "$IS_PULL_REQUEST" = "true" ]; then
|
if [ "$IS_PULL_REQUEST" = "true" ]; then
|
||||||
|
@ -67,8 +68,11 @@ build:
|
||||||
- rm test_file.txt
|
- rm test_file.txt
|
||||||
- ccache -s
|
- ccache -s
|
||||||
on_failure:
|
on_failure:
|
||||||
- rm -rf sanity-out out-2nd-pass
|
|
||||||
- mkdir -p shippable/testresults
|
- mkdir -p shippable/testresults
|
||||||
|
- mkdir -p shippable/codecoverage
|
||||||
|
- source zephyr-env.sh
|
||||||
|
- gcovr -r ${ZEPHYR_BASE} -x > shippable/codecoverage/coverage.xml
|
||||||
|
- rm -rf sanity-out out-2nd-pass
|
||||||
- >
|
- >
|
||||||
if [ -e compliance.xml ]; then
|
if [ -e compliance.xml ]; then
|
||||||
cp compliance.xml shippable/testresults/;
|
cp compliance.xml shippable/testresults/;
|
||||||
|
@ -78,8 +82,11 @@ build:
|
||||||
cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/;
|
cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/;
|
||||||
fi;
|
fi;
|
||||||
on_success:
|
on_success:
|
||||||
- rm -rf sanity-out out-2nd-pass
|
|
||||||
- mkdir -p shippable/testresults
|
- mkdir -p shippable/testresults
|
||||||
|
- mkdir -p shippable/codecoverage
|
||||||
|
- source zephyr-env.sh
|
||||||
|
- gcovr -r ${ZEPHYR_BASE} -x > shippable/codecoverage/coverage.xml
|
||||||
|
- rm -rf sanity-out out-2nd-pass
|
||||||
- >
|
- >
|
||||||
if [ -e compliance.xml ]; then
|
if [ -e compliance.xml ]; then
|
||||||
cp compliance.xml shippable/testresults/;
|
cp compliance.xml shippable/testresults/;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue