| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
This way, we don't have to worry about passing it on to distcheck; if it
is in the environment, it will get picked up.
[endlessm/eos-sdk#3303]
|
|
|
|
| |
[endlessm/eos-sdk#3303]
|
|
|
|
|
|
|
|
| |
Using an Automake conditional makes the mess of AS_IFs slightly simpler
and will allow us to access the value of EOS_ENABLE_COVERAGE in our
Makefile.am.
[endlessm/eos-sdk#3303]
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 87bf507ea1527804fb9f1d5dbb299e0604e3b55f.
On further discussion with Dan, we decided that projects should just opt
in to coverage-on-distcheck by setting DISTCHECK_CONFIGURE_FLAGS
themselves, instead of enforcing it from eos-coverage.m4.
[endlessm/eos-sdk#3303]
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even if coverage is not requested, it is still turned on during "make
distcheck". In that case, any --with-coverage-dir flag passed to configure
should be respected.
In general, it's good practice not to let the _presence_ of a configure
flag depend on the value of another configure flag; only the actions taken
as a result of that flag.
[endlessm/eos-sdk#3540]
|
|
|
|
|
|
|
|
|
|
|
| |
If configured without any --with-coverage-dir, then the makefile would
pass --with-coverage-dir= to make distcheck's configure flags, which
would end up trying to write coverage data to /output.
This changes --with-coverage-dir so that an empty argument means to use
the default value.
[endlessm/eos-sdk#3540]
|
|
|
|
|
|
|
|
|
|
| |
If we passed --enable-coverage to configure, then we probably
want it for distcheck as well. Otherwise we run the risk of
copying the run_coverage.coverage script over which has
commands configured for the parent build, but not the
distcheck build.
[endlessm/eos-sdk#3303]
|
| |
|
|
|
|
|
| |
lcov_cobertura is a python module, not a binary, so it must
be found in PYTHONPATH.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test automatically generates a coverage report at the
completion of all other tests. It exists as a pseudo-test which
depends on the completion of every other test. Effectively,
coverage reports are now generated automatically when
--enable-coverage is specified, though you can also run
make coverage-cobertura and make coverage-genhtml to update
them otherwise.
The burden on packages is that they must add .coverage to
TEST_EXTENSIONS and add run_coverage.coverage to TESTS.
[endlessm/eos-sdk#3303]
|
|
|
|
| |
[endlessm/eos-sdk#3303]
|
|
|
|
|
|
|
|
|
|
| |
Previously we used an environment variable, but environment
variables are not propogated unless make -e is used on
distcheck builds. A flag is safer.
Use --with-coverage-dir=DIRECTORY to specify it.
[endlessm/eos-sdk#3303]
|
|
|
|
|
|
|
| |
Just using $(abspath $(p)) might lead to odd results where we're
not in the source directory, which is the case with distcheck.
[endlessm/eos-sdk#3303]
|
|
|
|
|
|
|
|
|
|
| |
The default directory works for development machine cases, but for
distcheck, the data will be (or should be) cleaned away. CI systems
like jenkins need to preserve the data, so allow them to store it
somewhere else and only clean away the default directory on
the clean-coverage target.
[endlessm/eos-sdk#3303]
|
|
|
|
|
|
|
| |
Just using $(abspath $(p)) might lead to odd results where we're
not in the source directory, which is the case with distcheck.
[endlessm/eos-sdk#3303]
|
|
|
|
|
|
| |
Often these files are blacklisted for a reason, like the fact that
they are minified, which can wreak havoc with the coverage
machinery.
|
| |
|
|
|
|
| |
[endlessm/eos-shell#2264.1]
|
|
|
|
|
|
|
| |
This was fixed in automake-1.13, but lcov does not like relative
pathnames, so work around it by forcing the use of $(abspath).
[endlessm/eos-shell#2264]
|
| |
|
|
|
|
|
|
|
| |
We ship this module and the dependency is a burden on
clients of the coverage module.
[endlessm/eos-shell#2264]
|
|
We now provide a new m4 module eos-coverage.m4, which is installed
into the system aclocal directory. This macro provides three
new commands for SDK consumers to use:
EOS_COVERAGE_REPORT([languages]) - Enables a "coverage report".
The first argument is a space separated list of unquoted
languages to collect coverage information for. Valid values
at the moment are "c" and "js". For each language specified,
the macro will check for support for collecting coverage and
enable reporting accordingly. Raw coverage output goes in
$(abs_top_builddir)/_coverage/output/$language accordingly.
The macro then checks to see if a coverage reporter, either
genhtml, or cobertura, is available and enables them. A reporter
must be installed and available for coverage reports to be
generated.
The coverage-genhtml is enabled if lcov is installed and available.
This is generally used by developers themselves as it creates a
self-contained report.
The coverage-covertura is enabled if a program called
lcov-result-merger is installed and a python module called
lcov_cobertura are installed. lcov-result-merger can be
installed from Node Package Manager. lcov_cobertura
can be installed from PyPI.
lcov-result-merger is necessary because each test suite is run
in a separate subprocess and so there will be multiple entries
per source file in the coverage.lcov file generated by gjs.
lcov_cobertura doesn't handle that properly and so the
results need to be merged together properly.
JavaScript Coverage Details
===========================
A variable called EOS_JS_COVERAGE_FILES should be defined
containing a list of all javascript files to be considered
a "part of" the coverage report, before EOS_COVERAGE_RULES
are substituted. For example:
EOS_JS_COVERAGE_FILES = $(SRCS)
@EOS_COVERAGE_RULES@
AM_JS_LOG_FLAGS += @EOS_COVERAGE_JS_LOG_FLAGS@
C/C++ Coverage Details
======================
Certain additions also need to be made for Makefiles where
coverage reporting is enabled on a C project:
@EOS_COVERAGE_RULES@
AM_CFLAGS += @EOS_C_COVERAGE_CFLAGS@
AM_LDFLAGS += @EOS_C_COVERAGE_LDFLAGS@
If a target's CFLAGS is overridden and AM_CFLAGS is not used,
then @EOS_C_COVERAGE_CFLAGS@ must be added to its CFLAGS.
Blacklisting patterns
=====================
If a path should not appear in the coverage report, then it can
be blacklisted by adding a glob expression to
EOS_COVERAGE_BLACKLIST_PATTERNS.
Clean rules
===========
A clean-coverage target is added to the dependencies for
the clean-local target automatically by EOS_COVERAGE_RULES.
[endlessm/eos-shell#2264]
|