Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   pcrebuild    ( 3 )

Perl-совместимые регулярные выражения (Perl-compatible regular expressions)

CODE COVERAGE REPORTING

If your C compiler is gcc, you can build a version of PCRE that can generate a code coverage report for its test suite. To enable this, you must install lcov version 1.6 or above. Then specify

--enable-coverage

to the configure command and build PCRE in the usual way.

Note that using ccache (a caching C compiler) is incompatible with code coverage reporting. If you have configured ccache to run automatically on your system, you must set the environment variable

CCACHE_DISABLE=1

before running make to build PCRE, so that ccache is not used.

When --enable-coverage is used, the following addition targets are added to the Makefile:

make coverage

This creates a fresh coverage report for the PCRE test suite. It is equivalent to running "make coverage-reset", "make coverage- baseline", "make check", and then "make coverage-report".

make coverage-reset

This zeroes the coverage counters, but does nothing else.

make coverage-baseline

This captures baseline coverage information.

make coverage-report

This creates the coverage report.

make coverage-clean-report

This removes the generated coverage report without cleaning the coverage data itself.

make coverage-clean-data

This removes the captured coverage data without removing the coverage files created at compile time (*.gcno).

make coverage-clean

This cleans all coverage data including the generated coverage report. For more information about code coverage, see the gcov and lcov documentation.