From fdb7c58b26fe1cea18609dddcef95ed83e96e263 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Mon, 18 Feb 2019 14:34:45 +0900 Subject: [PATCH] add lcov targets --- .gitignore | 2 ++ Makefile.am | 12 ++++++++++++ test/Makefile.am | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 90a11c3..6af6a82 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,8 @@ Makefile.in /build /onig-*.tar.gz m4/*.m4 +/coverage +/coverage.info # src/ /src/CaseFolding.txt diff --git a/Makefile.am b/Makefile.am index 9167744..3ac3489 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,4 +40,16 @@ all-test: cd test; make test cov: + make lcov-clear + cd test; make CFLAGS="--coverage" test_utf8; ./test_utf8 + make lcov + +gcov: make CFLAGS="--coverage" + +lcov: + lcov -c -d src/.libs -o coverage.info + genhtml -o coverage coverage.info + +lcov-clear: + lcov -z -d . diff --git a/test/Makefile.am b/test/Makefile.am index b7f6842..43b6d98 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -39,7 +39,7 @@ testcu_SOURCES = testu.c testcu_LDADD = $(lib_onig) -cov: +gcov: make CFLAGS="--coverage" test_utf8 make CFLAGS="--coverage" testc make CFLAGS="--coverage" testp -- 2.40.0