~didier-barvaux/+junk/rohc-tcp

« back to all changes in this revision

Viewing changes to test/report_code_coverage.sh

  • Committer: Didier Barvaux
  • Date: 2013-06-30 12:53:19 UTC
  • mfrom: (535.1.213 rohc-main)
  • Revision ID: didier@barvaux.org-20130630125319-33xosfau63ygas1f
Sync with main branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# Create a report of code coverage with the help of zcov.
 
4
#
 
5
# Do not use this script directly, run configure with --enable-code-coverage,
 
6
# build the library, then run the tests:
 
7
#   ./configure --enable-code-coverage
 
8
#   make clean
 
9
#   make all
 
10
#   make check
 
11
#
 
12
# note: LANG=C and LC_ALL=C are required for zcov to work correctly
 
13
 
 
14
echo "" >&2
 
15
 
 
16
# scan for gcov output files, create the output.zcov report file
 
17
echo -n "Collect information about code coverage... " >&2
 
18
LANG=C LC_ALL=C zcov-scan output.zcov . || exit 1
 
19
echo "done." >&2
 
20
 
 
21
# generate one HTML report from the collected data
 
22
echo -n "Generate HTML report about code coverage... " >&2
 
23
LANG=C LC_ALL=C zcov-genhtml output.zcov coverage-report/ || exit 1
 
24
echo "done." >&2
 
25
 
 
26
echo "" >&2
 
27
echo "Load ./coverage-report/index.html in your favorite browser." >&2
 
28
echo "" >&2
 
29