summaryrefslogtreecommitdiff
path: root/m4/eos-coverage.m4
Commit message (Collapse)AuthorAge
* Use AC_ARG_VAR for EOS_COVERAGE_DIRPhilip Chimento2015-08-27
| | | | | | | 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]
* Fix indentation in eos-coverage.m4Philip Chimento2015-08-27
| | | | [endlessm/eos-sdk#3303]
* Use AM_CONDITIONAL in eos-coverage.m4Philip Chimento2015-08-27
| | | | | | | | 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]
* Revert "eos-coverage.m4: Forward coverage flags to distcheck"Philip Chimento2015-08-27
| | | | | | | | | | 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]
* Process --with-coverage-dir flag even without coveragePhilip Chimento2015-08-26
| | | | | | | | | | | | 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]
* Handle empty --with-coverage-dir argumentPhilip Chimento2015-08-26
| | | | | | | | | | | 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]
* eos-coverage.m4: Forward coverage flags to distcheckSam Spilsbury2015-07-25
| | | | | | | | | | 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]
* eos-coverage.m4: Fix missing substitutionSam Spilsbury2015-07-24
|
* eos-coverage: Fix misleading messageSam Spilsbury2015-07-21
| | | | | lcov_cobertura is a python module, not a binary, so it must be found in PYTHONPATH.
* eos-coverage: Add run_coverage.coverage "test"Sam Spilsbury2015-07-21
| | | | | | | | | | | | | | | 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]
* eos-coverage: Quote AC_MSG_CHECKING stringsSam Spilsbury2015-07-21
| | | | [endlessm/eos-sdk#3303]
* eos-coverage: Use flag to specify coverage directorySam Spilsbury2015-07-21
| | | | | | | | | | 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]
* eos-coverage: Explicitly put source directory before filenameSam Spilsbury2015-07-20
| | | | | | | 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]
* eos-coverage: Allow user to specify coverage data output directorySam Spilsbury2015-06-25
| | | | | | | | | | 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]
* eos-coverage: Explicitly put source directory before filenameSam Spilsbury2015-06-25
| | | | | | | 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]
* eos-coverage.m4: Don't add blacklisted files to --coverage-prefixSam Spilsbury2015-06-16
| | | | | | Often these files are blacklisted for a reason, like the fact that they are minified, which can wreak havoc with the coverage machinery.
* eos-coverage.m4: Update eos-coverage.m4 for --coverage-prefixSam Spilsbury2015-06-16
|
* Remove copyright and reference to MIT license in generated fileCosimo Cecchi2015-02-06
| | | | [endlessm/eos-shell#2264.1]
* m4: Work around abs_top_srcdir-is-actually-relative bug in automake.Sam Spilsbury2015-01-23
| | | | | | | 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]
* m4: Relicense eos-coverage.m4 under the MIT license.Sam Spilsbury2015-01-23
|
* m4: Don't use as-compiler-flag in eos-coverage.m4Sam Spilsbury2015-01-16
| | | | | | | We ship this module and the dependency is a burden on clients of the coverage module. [endlessm/eos-shell#2264]
* Enable Gjs and C coverage reports.Sam Spilsbury2015-01-10
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]