Re: code coverage and teuthology

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/14/2013 06:26 PM, Josh Durgin wrote:
>
> Looking at how it's run automatically might help:
>
> https://github.com/ceph/teuthology/blob/master/teuthology/coverage.py#L88
>
>
> You should also add 'coverage: true' for the ceph task overrides.
> This way daemons are killed with SIGTERM, and the atexit function
> that outputs coverage information will run.
>
> Then you don't need your patch changing the flavor either.
> For each task X, the docstring for teuthology.task.X.task documents
> example usage and extra options like this.
Hi,

That helped a lot, thanks :-) I think I'm almost there. After running:

./virtualenv/bin/teuthology --archive /tmp/a1 /srv/3node_rgw.yaml

wget -O /tmp/build/tmp.tgz http://gitbuilder.ceph.com/ceph-tarball-precise-x86_64-gcov/sha1/$(cat /tmp/a1/ceph-sha1)/ceph.x86_64.tgz

echo ceph_build_output_dir: /tmp/build >> ~/.teuthology.yaml

./virtualenv/bin/teuthology-coverage -v --html-output /tmp/html --lcov-output /tmp/lcov --cov-tools-dir /srv/teuthology/coverage /tmp

I get

INFO:teuthology.coverage:initializing coverage data...
Retrieving source and .gcno files...
Initializing lcov files...
Deleting all .da files in /tmp/lcov/ceph/src and subdirectories
Done.
Capturing coverage data from /tmp/lcov/ceph/src
Found gcov version: 4.7.2
Scanning /tmp/lcov/ceph/src for .gcno files ...
Found 692 graph files in /tmp/lcov/ceph/src
Processing src/test_libhadoopcephfs_build-AuthMethodList.gcno
geninfo: ERROR: /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno: reached unexpected end of file

root@ceph:/srv/teuthology# ls -l /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno
-rw-r--r-- 1 root root 41088 Jan 15 09:49 /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno

I'm using

lcov: LCOV version 1.9

The only problem I can think of is that the machine I'm running lcov on is a Debian GNU/Linux Wheezy, trying to analyze coverage for binaries created for Ubuntu Precise. They are both amd64 but .gcno files may have dependencies to the toolchain.

Did you ever run into similar problems ?

Cheers

-----------------------------
check-locks: false
interactive-on-error: true
overrides:
  ceph:
    branch: master
    flavor: gcov
    coverage: true
    fs: xfs
roles:
- - mon.a
  - mon.c
  - osd.0
- - mon.b
  - mds.a
  - osd.1
- - client.0
tasks:
- ceph:
   coverage: true

targets:
...

begin:vcard
fn:Loic Dachary
n:Dachary;Loic
org:Artisan Logiciel Libre
adr:;;12 bd Magenta;Paris;;75010;France
email;internet:loic@xxxxxxxxxxx
title:Senior Developer
tel;work:+33 4 84 25 08 05
tel;home:+33 9 51 18 43 38
tel;cell:+33 6 64 03 29 07
note:Born 131414404 before EPOCH.
url:http://dachary.org/
version:2.1
end:vcard

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux