~ubuntu-branches/ubuntu/quantal/pitivi/quantal

« back to all changes in this revision

Viewing changes to common/coverage/lcov.mak

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2008-12-12 10:22:29 UTC
  • mfrom: (1.1.6 upstream)
  • mto: (3.2.2 jaunty) (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20081212102229-7c3etvaoy9ys0x28
Tags: upstream-0.11.3
Import upstream version 0.11.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## .PHONY so it always rebuilds it
 
2
.PHONY: lcov-reset lcov lcov-run lcov-report lcov-upload
 
3
 
1
4
# run lcov from scratch, always
2
5
lcov-reset:
3
 
        make lcov-run
4
 
        make lcov-report
 
6
        $(MAKE) lcov-run
 
7
        $(MAKE) lcov-report
5
8
 
6
9
# run lcov from scratch if the dir is not there
7
10
lcov:
8
 
        make lcov-reset
 
11
        $(MAKE) lcov-reset
9
12
 
 
13
if GST_GCOV_ENABLED
10
14
# reset run coverage tests
11
15
lcov-run:
12
16
        @-rm -rf lcov
13
 
        find . -name "*.gcda" -exec rm {} \;
14
 
        if test -d tests/check; then make -C tests/check inspect; fi
15
 
        make check
 
17
        lcov --directory . --zerocounters
 
18
        -if test -d tests/check; then $(MAKE) -C tests/check inspect; fi
 
19
        -$(MAKE) check
16
20
 
17
21
# generate report based on current coverage data
18
22
lcov-report:
19
23
        mkdir lcov
20
 
        lcov --directory . --capture --output-file lcov/lcov.info
 
24
        lcov --compat-libtool --directory . --capture --output-file lcov/lcov.info
21
25
        lcov -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > lcov/remove
22
26
        lcov -l lcov/lcov.info | grep "tests/check/" | cut -d: -f1 >> lcov/remove
23
27
        lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
24
28
        rm lcov/remove
25
29
        mv lcov/lcov.cleaned.info lcov/lcov.info
26
 
        genhtml -t "$(PACKAGE_STRING)" -o lcov lcov/lcov.info
 
30
        genhtml -t "$(PACKAGE_STRING)" -o lcov --num-spaces 2 lcov/lcov.info
27
31
 
28
32
lcov-upload: lcov
29
33
        rsync -rvz -e ssh --delete lcov/* gstreamer.freedesktop.org:/srv/gstreamer.freedesktop.org/www/data/coverage/lcov/$(PACKAGE)
 
34
 
 
35
else
 
36
lcov-run:
 
37
        echo "Need to reconfigure with --enable-gcov"
 
38
 
 
39
lcov-report:
 
40
        echo "Need to reconfigure with --enable-gcov"
 
41
endif
 
42