summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-07-01 11:48:06 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-07-01 11:48:06 +0000
commitca8e38d44454d9ecace87ff0598498f99ea00113 (patch)
tree2713d2fd35a369ccf84372af4b47430f5c8407d3
parent0e6364b1e5fa11a306ce1da0ebcec959156be6b1 (diff)
downloadeina-ca8e38d44454d9ecace87ff0598498f99ea00113.tar.gz
Eina: remove --enable-coverage option.
Now, coverage is detected with just --enable-tests. Buildbot maintainers : please remove --enable-coverage option to eina (more EFL will be supported later) SVN revision: 73107
-rw-r--r--Makefile.am31
-rw-r--r--configure.ac12
-rw-r--r--m4/common/efl_coverage.m462
-rw-r--r--m4/common/efl_tests.m428
4 files changed, 37 insertions, 96 deletions
diff --git a/Makefile.am b/Makefile.am
index 613b8d2..6036f04 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,7 +42,6 @@ m4/common/efl_attribute.m4 \
m4/common/efl_benchmark.m4 \
m4/common/efl_check_funcs.m4 \
m4/common/efl_compiler_flag.m4 \
-m4/common/efl_coverage.m4 \
m4/common/efl_cpu.m4 \
m4/common/efl_doxygen.m4 \
m4/common/efl_examples.m4 \
@@ -53,7 +52,7 @@ m4/common/efl_voltron.m4 \
m4/eina/eina_bench.m4 \
m4/eina/eina_check.m4
-.PHONY: doc coverage benchmark
+.PHONY: doc benchmark
# Documentation
@@ -65,19 +64,6 @@ doc:
if EFL_ENABLE_TESTS
-check-local:
- @./src/tests/eina_suite
-
-else
-
-check-local:
- @echo "reconfigure with --enable-tests"
-
-endif
-
-# Coverage report
-
-if EFL_ENABLE_COVERAGE
lcov-reset:
@rm -rf $(top_builddir)/coverage
@find $(top_builddir) -name "*.gcda" -delete
@@ -90,19 +76,22 @@ lcov-report:
genhtml -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned.info
@echo "Coverage Report at $(top_builddir)/coverage/html"
-coverage:
+check-local:
@$(MAKE) lcov-reset
- @$(MAKE) check
+ @./src/tests/eina_suite
@$(MAKE) lcov-report
+
else
+
lcov-reset:
- @echo "reconfigure with --enable-coverage"
+ @echo "reconfigure with --enable-tests"
lcov-report:
- @echo "reconfigure with --enable-coverage"
+ @echo "reconfigure with --enable-tests"
+
+check-local:
+ @echo "reconfigure with --enable-tests"
-coverage:
- @echo "reconfigure with --enable-tests --enable-coverage"
endif
if EFL_ENABLE_BENCHMARK
diff --git a/configure.ac b/configure.ac
index 864eaa1..19022f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -531,14 +531,7 @@ EINA_CHECK_MODULE([one-big], [${enable_one_big}], [one big])
### Unit tests, coverage and benchmarking
-EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
-
-EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
-EINA_CFLAGS="${EINA_CFLAGS} ${EFL_COVERAGE_CFLAGS}"
-EINA_LIBS="${EINA_LIBS} ${EFL_COVERAGE_LIBS}"
-if test "x$enable_coverage" = "xyes" ; then
- EINA_CFLAGS="${EINA_CFLAGS} ${EFL_DEBUG_CFLAGS}"
-fi
+EFL_CHECK_TESTS([eina], [enable_tests="yes"], [enable_tests="no"])
EFL_CHECK_BENCHMARK([enable_benchmark="yes"], [enable_benchmark="no"])
EINA_BENCH_MODULE([glib], [${enable_benchmark}], [glib-2.0], [enable_benchmark_glib="yes"], [enable_benchmark_glib="no"])
@@ -612,8 +605,7 @@ echo " File xattr...........: ${efl_func_setxattr}"
echo " shm_open.............: ${efl_func_shm_open}"
echo
echo " Documentation........: ${build_doc}"
-echo " Tests................: ${enable_tests}"
-echo " Coverage.............: ${enable_coverage}"
+echo " Tests................: ${enable_tests} (Coverage: ${efl_enable_coverage})"
echo " Examples.............: ${enable_build_examples}"
echo " Tiler Example........: ${build_tiler_example}"
echo " Examples installed...: ${enable_install_examples}"
diff --git a/m4/common/efl_coverage.m4 b/m4/common/efl_coverage.m4
deleted file mode 100644
index 85d0321..0000000
--- a/m4/common/efl_coverage.m4
+++ /dev/null
@@ -1,62 +0,0 @@
-dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
-dnl That code is public domain and can be freely used or copied.
-
-dnl Macro that check if coverage support is wanted and, if yes, if
-dnl lcov is available.
-
-dnl Usage: EFL_CHECK_COVERAGE(tests [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl The parameter 'tests' is used if a dependency is needed. If set to "yes",
-dnl the dependency is available.
-dnl Defines EFL_COVERAGE_CFLAGS and EFL_COVERAGE_LIBS variables
-dnl Defines the automake conditionnal EFL_ENABLE_COVERAGE
-
-AC_DEFUN([EFL_CHECK_COVERAGE],
-[
-
-dnl configure option
-
-AC_ARG_ENABLE([coverage],
- [AC_HELP_STRING([--enable-coverage], [enable coverage profiling instrumentation @<:@default=disabled@:>@])],
- [
- if test "x${enableval}" = "xyes" ; then
- _efl_enable_coverage="yes"
- else
- _efl_enable_coverage="no"
- fi
- ],
- [_efl_enable_coverage="no"])
-
-AC_MSG_CHECKING([whether to use profiling instrumentation])
-AC_MSG_RESULT([$_efl_enable_coverage])
-
-dnl lcov check
-
-if test "x$_efl_enable_coverage" = "xyes" && test ! "x$1" = "xyes" ; then
- AC_MSG_WARN([Coverage report requested but tests not being built, disable profiling instrumentation.])
- AC_MSG_WARN([Run configure with --enable-tests])
- _efl_enable_coverage="no"
-fi
-
-if test "x$_efl_enable_coverage" = "xyes" ; then
- AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
- if test "x$have_lcov" = "xyes" ; then
- EFL_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
- EFL_COVERAGE_LIBS="-lgcov"
-# remove any optimisation flag and force debug symbols
- EFL_DEBUG_CFLAGS="-g -O0 -DDEBUG"
- else
- AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
- _efl_enable_coverage="no"
- fi
-fi
-
-dnl Substitution
-AC_SUBST(EFL_COVERAGE_CFLAGS)
-AC_SUBST(EFL_COVERAGE_LIBS)
-
-AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes")
-
-AS_IF([test "x$_efl_enable_coverage" = "xyes"], [$2], [$3])
-])
-
-dnl End of efl_coverage.m4
diff --git a/m4/common/efl_tests.m4 b/m4/common/efl_tests.m4
index 3a4dfe2..edd57f2 100644
--- a/m4/common/efl_tests.m4
+++ b/m4/common/efl_tests.m4
@@ -1,14 +1,16 @@
-dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
+dnl Copyright (C) 2008-2012 Vincent Torri <vtorri at univ-evry dot fr>
dnl That code is public domain and can be freely used or copied.
dnl Macro that check if tests programs are wanted and if yes, if
dnl the Check library is available.
+dnl the lcov program is available.
-dnl Usage: EFL_CHECK_TESTS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Usage: EFL_CHECK_TESTS(EFL[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Define the automake conditionnal EFL_ENABLE_TESTS
AC_DEFUN([EFL_CHECK_TESTS],
[
+m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
dnl configure option
@@ -35,9 +37,29 @@ if test "x${_efl_enable_tests}" = "xyes" ; then
[_efl_enable_tests="no"])
fi
+efl_enable_coverage="no"
+if test "x${_efl_enable_tests}" = "xyes" ; then
+ AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
+ if test "x$have_lcov" = "xyes" ; then
+ m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -fprofile-arcs -ftest-coverage"
+ m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -lgcov"
+# remove any optimisation flag and force debug symbols
+ m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -g -O0 -DDEBUG"
+ efl_enable_coverage="yes"
+ else
+ AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
+ fi
+fi
+
+dnl Substitution
+AC_SUBST(EFL_COVERAGE_CFLAGS)
+AC_SUBST(EFL_COVERAGE_LIBS)
+
AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
-AS_IF([test "x$_efl_enable_tests" = "xyes"], [$1], [$2])
+AS_IF([test "x$_efl_enable_tests" = "xyes"], [$2], [$3])
+
+m4_popdef([UPEFL])
])
dnl End of efl_tests.m4