diff options
author | caro <caro> | 2012-09-09 10:09:02 +0000 |
---|---|---|
committer | caro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33> | 2012-09-09 10:09:02 +0000 |
commit | 5387e563be110faa40dcdb099a0f0226c21a738f (patch) | |
tree | cb802764d73c28835637ad0e956f0ff13601620c | |
parent | 6f92310b0dc2683661723c5a15956fc373fd82a1 (diff) | |
download | eobj-5387e563be110faa40dcdb099a0f0226c21a738f.tar.gz eobj-5387e563be110faa40dcdb099a0f0226c21a738f.tar.bz2 eobj-5387e563be110faa40dcdb099a0f0226c21a738f.zip |
Eo: let's see if Tom likes this check rule
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@76353 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
-rw-r--r-- | Makefile.am | 21 | ||||
-rw-r--r-- | configure.ac | 37 |
2 files changed, 37 insertions, 21 deletions
diff --git a/Makefile.am b/Makefile.am index 7c02688..765232e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,9 +50,6 @@ doc: # Unit tests -if EFL_ENABLE_TESTS - - lcov-reset: @rm -rf $(top_builddir)/coverage @find $(top_builddir) -name "*.gcda" -delete @@ -69,24 +66,14 @@ check-local: if EFL_ENABLE_COVERAGE @$(MAKE) lcov-reset endif - @./src/tests/eo_suite/eo_suite + @dirs=`find src/tests -maxdepth 1 -type d \! -name '.*' -printf '%P\n' | sort` ; \ + for dir in $$dirs ; do \ + ./src/tests/$$dir/$$dir ; \ + done if EFL_ENABLE_COVERAGE @$(MAKE) lcov-report endif -else - -lcov-reset: - @echo "reconfigure with --enable-tests" - -lcov-report: - @echo "reconfigure with --enable-tests" - -check-local: - @echo "reconfigure with --enable-tests" - -endif - if EFL_ENABLE_BENCHMARK benchmark: diff --git a/configure.ac b/configure.ac index c7b2228..68db785 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,6 @@ AH_BOTTOM([ AM_INIT_AUTOMAKE([1.6 dist-bzip2]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -#lt_cv_deplibs_check_method='pass_all' AC_LIBTOOL_WIN32_DLL define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl @@ -76,6 +75,20 @@ requirements_pc_eo="eina" ### Additional options to configure +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}]) + ### Checks for programs @@ -96,6 +109,17 @@ AC_SUBST(pkgconfig_requires_private) EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"]) +# lcov + +if test "x$_efl_enable_coverage" = "xyes" ; then + AC_CHECK_PROG(have_lcov, [lcov], [yes], [no]) + if test "x$have_lcov" = "xno" ; then + _efl_enable_coverage="no" + fi +fi + +AM_CONDITIONAL([EFL_ENABLE_COVERAGE], [test "x${_efl_enable_coverage}" = "xyes"]) + ### Checks for libraries @@ -119,6 +143,11 @@ AC_CHECK_HEADERS([stdarg.h]) ### Checks for compiler characteristics +if test "x$_efl_enable_coverage" = "xyes" ; then + EO_CFLAGS="${EO_CFLAGS} -fprofile-arcs -ftest-coverage" + EO_LIBS="${EO_LIBS} -lgcov" +fi + ### Checks for linker characteristics @@ -136,8 +165,6 @@ AC_SUBST([lt_enable_auto_import]) ### Unit tests, coverage and benchmarking -EFL_CHECK_TESTS([eina], [enable_tests="yes"], [enable_tests="no"]) - EFL_CHECK_BENCHMARK([enable_benchmark="yes"], [enable_benchmark="no"]) AC_SUBST([requirements_pc_eo]) @@ -185,7 +212,9 @@ echo echo "Configuration Options Summary:" echo echo " Documentation........: ${build_doc}" -echo " Unit Tests...........: ${enable_tests} (Coverage: ${efl_enable_coverage})" +echo " Unit Tests...........:" +echo " build..............: make check" +echo " coverage...........: ${_efl_enable_coverage}" echo " Examples.............: ${enable_build_examples}" echo " Benchmark............: ${enable_benchmark}" echo |