On 02/02/17 18:48, Mike Holmes wrote:
> On 2 February 2017 at 09:41, Maxim Uvarov <maxim.uva...@linaro.org> wrote:
>> Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org>
> 
> Adding a note in the read me on how to find your code coverage results
> might help
> 

ok, in general there will be:
1. link printed in travis job.
2. banner link which we will place to wiki page.
3. it will automatically create a comment in merge request.



>> ---
>>  .travis.yml | 51 +++++++++++++++++++++++++++++++++++++++++++--------
>>  1 file changed, 43 insertions(+), 8 deletions(-)
>>
>> diff --git a/.travis.yml b/.travis.yml
>> index 03e61b18..9e474da2 100644
>> --- a/.travis.yml
>> +++ b/.travis.yml
>> @@ -7,21 +7,53 @@
>>  # pushing to github/coverity_scan will also launch a static analysis
>>  # See https://scan.coverity.com/travis_ci
>>
>> +language: c
>> +sudo: required
>> +addons:
>> +  apt:
>> +    sources:
>> +    # add PPAs with more up-to-date toolchains
>> +    - ubuntu-toolchain-r-test
>> +    - llvm-toolchain-precise-3.6
>> +    packages:
>> +    # install toolchains
>> +    - gcc
>> +
>>  env:
>>    global:
>>      # COVERITY_SCAN_TOKEN
>>      # ** specific to your project **
>>      - secure: "xxxx"
>> +    - CODECOV_TOKEN=8e1c0fd8-62ff-411e-a79f-5839f6662c11
> 
> Is this your token, can we all use it ?
> 

it's Linaro/odp group token. I think you can see it in settings. And yes
everybody can use it.


will send v2 rebased on current.

Maxim.

>>
>> -language: c
>> -compiler: clang
>> -sudo: required
>> +matrix:
>> +  include:
>> +    - compiler: gcc-4.8
>> +      addons:
>> +        apt:
>> +          sources:
>> +            - ubuntu-toolchain-r-test
>> +            - llvm-toolchain-precise-3.8
>> +          packages:
>> +            - gcc-4.8
>> +      env: MY_CF="-O0 -coverage" MY_LDF="--coverage" DOCOV=1
>> +    - compiler: clang
>> +      addons:
>> +        apt:
>> +          sources:
>> +            - ubuntu-toolchain-r-test
>> +            - llvm-toolchain-precise-3.8
>> +          packages:
>> +            - clang
>>
>>  before_install:
>> +        - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
>>          - sudo apt-get -qq update
>>          - sudo apt-get install automake autoconf libtool libssl-dev 
>> graphviz mscgen doxygen
>>          - sudo apt-get install libpcap-dev linux-headers-`uname -r`
>> +        - sudo pip install coverage
>>          - gem install asciidoctor
>> +        - PATH=${PATH//:\.\/node_modules\/\.bin/}
>>
>>  #       Install cunit for the validation tests because distro version is 
>> too old and fails C99 compile
>>          - export CUNIT_VERSION=2.1-3
>> @@ -47,15 +79,18 @@ before_install:
>>          - popd
>>
>>  script:
>> -
>> -        - ./bootstrap
>> -        - ./configure --enable-test-cpp --enable-test-vald 
>> --enable-test-helper --enable-test-perf --enable-user-guides 
>> --enable-test-perf-proc --enable-test-example 
>> --with-dpdk-path=`pwd`/dpdk/${TARGET}
>> -        - make check
>> -        - git clean -f -d -x && rm -rf dpdk
>>          - ./bootstrap
>>          - ./configure
>>          - make doxygen-doc
>>          - make distcheck
>> +        - git clean -f -d -x
>> +        - ./bootstrap
>> +        - ./configure --enable-test-cpp --enable-test-vald 
>> --enable-test-helper --enable-test-perf --enable-user-guides 
>> --enable-test-perf-proc --enable-test-example 
>> --with-dpdk-path=`pwd`/dpdk/${TARGET} CFLAGS="$MY_CF" CXXFLAGS="$MY_CF" 
>> LDFLAGS="$MY_LDF"
>> +        - make check
>> +        - rm -rf dpdk
>> +
>> +after_success:
>> +  - if [ -n "$DOCOV" ]; then find . -type f -iname '*.[ch]' -not -path 
>> ".git/*" -execdir gcov-4.8 {} \; ; bash <(curl -s https://codecov.io/bash) 
>> -X coveragepy; fi
>>
>>  addons:
>>      coverity_scan:
>> --
>> 2.11.0.295.gd7dffce
>>
> 
> I think this will show coverage for all executables run, is that as
> valuable as showing the coverage that only comes from the execution of
> the validation tests whos purpose is to cover all the implimentation ?
> 
> 

Reply via email to