diff --git a/legacy/eobj/Makefile.am b/legacy/eobj/Makefile.am index 7c026881fe..765232e221 100644 --- a/legacy/eobj/Makefile.am +++ b/legacy/eobj/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/legacy/eobj/configure.ac b/legacy/eobj/configure.ac index c7b22288b5..68db785985 100644 --- a/legacy/eobj/configure.ac +++ b/legacy/eobj/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