diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-04-14 06:21:26 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-04-14 06:21:26 +0000 |
commit | 7c83d004874a46efe36d58717f7a4d72553b3693 (patch) | |
tree | 40fdb91a99c0ea0a9e4ce884126c0f572959a003 /Makefile.am | |
parent | 12a8a7f9a90e45e8313f26af527a52e6dda943d3 (diff) |
* Better dependency tracking for unit test building and linking, and
auto-generated headers (metakind.h etc.), so they don't have to be
recompiled every time. This drastically improves build time when
only small updates are made.
* Added "memory.h" unit test header for checking out-of-memory
conditions. cdlist_black uses it.
* Added helpful output when you "make lcov" in a non-coverage-enabled
build.
* Removed strict aliasing warning when compiling metakind.h header
with optimization on.
* Removed const version of NodeBuilder::operator Node()---it was
poorly performing, better to not permit it---and fixed the
convenience builders to use the non-const version
(re: code review #63)
* Color-coded test output on capable terminals.
* Fixed some warnings in unit tests.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 57e9e3af2..8488c4dec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,10 +19,12 @@ LCOV_EXCLUDES = \ "/usr/include/*" \ "$(abs_top_builddir)/test/*" +.PHONY: lcov lcov-all lcov18 +if COVERAGE_ENABLED + # lcov 1.7 has some bugs that we have to work around (can't do # baseline measurement, merge between different test-names doesn't # work...) -.PHONY: lcov lcov: all $(LCOV) -z -d . $(MAKE) check -C test/unit @@ -34,10 +36,20 @@ lcov: all @find "@top_srcdir@/html" -name '*.func.html' | \ xargs perl -pi -e 's#(<td class="coverFn"><a href=".*">)(.*)(</a></td>)#$$_=`c++filt "$$2"`;chomp;print "$$1<xmp>$$_</xmp>$$3\n";#e' +lcov-all: all + $(LCOV) -z -d . + $(MAKE) check -C test + $(LCOV) -c -d . -t cvc4_units -o cvc4-coverage-full.info + $(LCOV) -o cvc4-coverage.info -r cvc4-coverage-full.info $(LCOV_EXCLUDES) + mkdir -p "@top_srcdir@/html" + $(GENHTML) -o "@top_srcdir@/html" cvc4-coverage.info + @echo "De-mangling C++ symbols..." + @find "@top_srcdir@/html" -name '*.func.html' | \ + xargs perl -pi -e 's#(<td class="coverFn"><a href=".*">)(.*)(</a></td>)#$$_=`c++filt "$$2"`;chomp;print "$$1<xmp>$$_</xmp>$$3\n";#e' + # when we get a working lcov, we can do better stats for # modules/test-types; unfortunately lcov 1.8 directory paths # are broken(?) or at least different than 1.7 -.PHONY: lcov18 lcov18: all @for testtype in public black white; do \ echo; echo "=== Collecting coverage data from $$testtype unit tests ==="; \ @@ -56,3 +68,15 @@ lcov18: all @echo "De-mangling C++ symbols..." @find "@top_srcdir@/html" -name '*.func.html' | \ xargs perl -ni -e 's,(<td class="coverFn"><a href=".*">)(.*)(</a></td>.*),$$_=`c++filt "$$2"`;chomp;print "$$1<xmp>$$_</xmp>$$3\n";,e || print' + +else + +lcov lcov-all lcov18: + @echo + @echo "Coverage is not enabled in this build." >&2 + @echo "Please run configure with --enable-coverage." >&2 + @echo + @false + +endif + |