summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--legacy/ecore/Makefile.am33
-rw-r--r--legacy/ecore/configure.ac10
-rw-r--r--legacy/ecore/m4/efl_coverage.m462
-rw-r--r--legacy/ecore/src/lib/ecore_cocoa/Makefile.am3
-rw-r--r--legacy/ecore/src/lib/ecore_con/Makefile.am3
-rw-r--r--legacy/ecore/src/lib/ecore_config/Makefile.am3
-rw-r--r--legacy/ecore/src/lib/ecore_directfb/Makefile.am2
-rw-r--r--legacy/ecore/src/lib/ecore_evas/Makefile.am3
-rw-r--r--legacy/ecore/src/lib/ecore_fb/Makefile.am4
-rw-r--r--legacy/ecore/src/lib/ecore_file/Makefile.am3
-rw-r--r--legacy/ecore/src/tests/Makefile.am3
11 files changed, 118 insertions, 11 deletions
diff --git a/legacy/ecore/Makefile.am b/legacy/ecore/Makefile.am
index b7be982153..9f16aeb665 100644
--- a/legacy/ecore/Makefile.am
+++ b/legacy/ecore/Makefile.am
@@ -117,6 +117,7 @@ m4/ecore_check_options.m4 \
117m4/efl_doxygen.m4 \ 117m4/efl_doxygen.m4 \
118m4/efl_path_max.m4 \ 118m4/efl_path_max.m4 \
119m4/efl_shm_open.m4 \ 119m4/efl_shm_open.m4 \
120m4/efl_coverage.m4 \
120m4/efl_tests.m4 \ 121m4/efl_tests.m4 \
121m4/efl_threads.m4 122m4/efl_threads.m4
122 123
@@ -196,7 +197,7 @@ if BUILD_ECORE_WAYLAND
196pkgconfig_DATA += ecore-wayland.pc 197pkgconfig_DATA += ecore-wayland.pc
197endif 198endif
198 199
199.PHONY: doc 200.PHONY: doc coverage
200 201
201# Documentation 202# Documentation
202 203
@@ -217,3 +218,33 @@ check-local:
217 @echo "reconfigure with --enable-tests" 218 @echo "reconfigure with --enable-tests"
218 219
219endif 220endif
221
222# Coverage report
223
224if EFL_ENABLE_COVERAGE
225lcov-reset:
226 @rm -rf $(top_builddir)/coverage
227 @find $(top_builddir) -name "*.gcda" -delete
228 @lcov --zerocounters --directory $(top_builddir)
229
230lcov-report:
231 @mkdir $(top_builddir)/coverage
232 lcov --capture --compat-libtool --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir)
233 lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info
234 genhtml -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned.info
235 @echo "Coverage Report at $(top_builddir)/coverage/html"
236
237coverage:
238 @$(MAKE) lcov-reset
239 @$(MAKE) check
240 @$(MAKE) lcov-report
241else
242lcov-reset:
243 @echo "reconfigure with --enable-coverage"
244
245lcov-report:
246 @echo "reconfigure with --enable-coverage"
247
248coverage:
249 @echo "reconfigure with --enable-tests --enable-coverage"
250endif
diff --git a/legacy/ecore/configure.ac b/legacy/ecore/configure.ac
index 2ab207b0f2..b0a05fc30b 100644
--- a/legacy/ecore/configure.ac
+++ b/legacy/ecore/configure.ac
@@ -1969,10 +1969,17 @@ ECORE_EVAS_CHECK_MODULE_FULL([wayland-egl], [wayland-egl egl >= 7.10],
1969 fi 1969 fi
1970 ]) 1970 ])
1971 1971
1972### Unit tests 1972### Unit tests and coverage
1973 1973
1974EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"]) 1974EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
1975 1975
1976EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
1977CFLAGS="${CFLAGS} ${EFL_COVERAGE_CFLAGS}"
1978ECORE_LIBS="${ECORE_LIBS} ${EFL_COVERAGE_LIBS}"
1979if test "x$enable_coverage" = "xyes" ; then
1980 CFLAGS="${CFLAGS} ${EFL_DEBUG_CFLAGS}"
1981fi
1982
1976### install and build examples 1983### install and build examples
1977 1984
1978EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"]) 1985EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
@@ -2220,6 +2227,7 @@ if test "x${have_ecore_evas}" = "xyes" ; then
2220fi 2227fi
2221echo 2228echo
2222echo " Tests................: ${enable_tests}" 2229echo " Tests................: ${enable_tests}"
2230echo " Coverage.............: ${enable_coverage}"
2223echo " Maximum log level....: ${with_max_log_level}" 2231echo " Maximum log level....: ${with_max_log_level}"
2224echo "Documentation..........: ${build_doc}" 2232echo "Documentation..........: ${build_doc}"
2225echo "Examples...............: ${enable_build_examples}" 2233echo "Examples...............: ${enable_build_examples}"
diff --git a/legacy/ecore/m4/efl_coverage.m4 b/legacy/ecore/m4/efl_coverage.m4
new file mode 100644
index 0000000000..85d03215b3
--- /dev/null
+++ b/legacy/ecore/m4/efl_coverage.m4
@@ -0,0 +1,62 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if coverage support is wanted and, if yes, if
5dnl lcov is available.
6
7dnl Usage: EFL_CHECK_COVERAGE(tests [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8dnl The parameter 'tests' is used if a dependency is needed. If set to "yes",
9dnl the dependency is available.
10dnl Defines EFL_COVERAGE_CFLAGS and EFL_COVERAGE_LIBS variables
11dnl Defines the automake conditionnal EFL_ENABLE_COVERAGE
12
13AC_DEFUN([EFL_CHECK_COVERAGE],
14[
15
16dnl configure option
17
18AC_ARG_ENABLE([coverage],
19 [AC_HELP_STRING([--enable-coverage], [enable coverage profiling instrumentation @<:@default=disabled@:>@])],
20 [
21 if test "x${enableval}" = "xyes" ; then
22 _efl_enable_coverage="yes"
23 else
24 _efl_enable_coverage="no"
25 fi
26 ],
27 [_efl_enable_coverage="no"])
28
29AC_MSG_CHECKING([whether to use profiling instrumentation])
30AC_MSG_RESULT([$_efl_enable_coverage])
31
32dnl lcov check
33
34if test "x$_efl_enable_coverage" = "xyes" && test ! "x$1" = "xyes" ; then
35 AC_MSG_WARN([Coverage report requested but tests not being built, disable profiling instrumentation.])
36 AC_MSG_WARN([Run configure with --enable-tests])
37 _efl_enable_coverage="no"
38fi
39
40if test "x$_efl_enable_coverage" = "xyes" ; then
41 AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
42 if test "x$have_lcov" = "xyes" ; then
43 EFL_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
44 EFL_COVERAGE_LIBS="-lgcov"
45# remove any optimisation flag and force debug symbols
46 EFL_DEBUG_CFLAGS="-g -O0 -DDEBUG"
47 else
48 AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
49 _efl_enable_coverage="no"
50 fi
51fi
52
53dnl Substitution
54AC_SUBST(EFL_COVERAGE_CFLAGS)
55AC_SUBST(EFL_COVERAGE_LIBS)
56
57AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes")
58
59AS_IF([test "x$_efl_enable_coverage" = "xyes"], [$2], [$3])
60])
61
62dnl End of efl_coverage.m4
diff --git a/legacy/ecore/src/lib/ecore_cocoa/Makefile.am b/legacy/ecore/src/lib/ecore_cocoa/Makefile.am
index 4ac7b118d6..c41bd9befc 100644
--- a/legacy/ecore/src/lib/ecore_cocoa/Makefile.am
+++ b/legacy/ecore/src/lib/ecore_cocoa/Makefile.am
@@ -6,7 +6,8 @@ AM_CPPFLAGS = \
6-I$(top_builddir)/src/lib/ecore \ 6-I$(top_builddir)/src/lib/ecore \
7-I$(top_builddir)/src/lib/ecore_input \ 7-I$(top_builddir)/src/lib/ecore_input \
8@EVAS_CFLAGS@ \ 8@EVAS_CFLAGS@ \
9@EINA_CFLAGS@ 9@EINA_CFLAGS@ \
10@EFL_ECORE_BUILD@
10 11
11lib_LTLIBRARIES = libecore_cocoa.la 12lib_LTLIBRARIES = libecore_cocoa.la
12includes_HEADERS = \ 13includes_HEADERS = \
diff --git a/legacy/ecore/src/lib/ecore_con/Makefile.am b/legacy/ecore/src/lib/ecore_con/Makefile.am
index 0e8e071545..1c3871ffcc 100644
--- a/legacy/ecore/src/lib/ecore_con/Makefile.am
+++ b/legacy/ecore/src/lib/ecore_con/Makefile.am
@@ -12,7 +12,8 @@ AM_CPPFLAGS = \
12@EINA_CFLAGS@ \ 12@EINA_CFLAGS@ \
13@TLS_CFLAGS@ \ 13@TLS_CFLAGS@ \
14@CARES_CFLAGS@ \ 14@CARES_CFLAGS@ \
15@WIN32_CPPFLAGS@ 15@WIN32_CPPFLAGS@ \
16@EFL_ECORE_BUILD@
16 17
17lib_LTLIBRARIES = libecore_con.la 18lib_LTLIBRARIES = libecore_con.la
18includes_HEADERS = Ecore_Con.h 19includes_HEADERS = Ecore_Con.h
diff --git a/legacy/ecore/src/lib/ecore_config/Makefile.am b/legacy/ecore/src/lib/ecore_config/Makefile.am
index c4593515eb..c8e8ae3f08 100644
--- a/legacy/ecore/src/lib/ecore_config/Makefile.am
+++ b/legacy/ecore/src/lib/ecore_config/Makefile.am
@@ -12,7 +12,8 @@ AM_CPPFLAGS = \
12-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ 12-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
13@EVAS_CFLAGS@ \ 13@EVAS_CFLAGS@ \
14@EET_CFLAGS@ \ 14@EET_CFLAGS@ \
15@EINA_CFLAGS@ 15@EINA_CFLAGS@ \
16@EFL_ECORE_BUILD@
16 17
17CLEANFILES = $(DB) 18CLEANFILES = $(DB)
18 19
diff --git a/legacy/ecore/src/lib/ecore_directfb/Makefile.am b/legacy/ecore/src/lib/ecore_directfb/Makefile.am
index 8142d33b39..6c536269e8 100644
--- a/legacy/ecore/src/lib/ecore_directfb/Makefile.am
+++ b/legacy/ecore/src/lib/ecore_directfb/Makefile.am
@@ -3,7 +3,7 @@ MAINTAINERCLEANFILES = Makefile.in
3AM_CPPFLAGS = \ 3AM_CPPFLAGS = \
4-I$(top_srcdir)/src/lib/ecore \ 4-I$(top_srcdir)/src/lib/ecore \
5-I$(top_builddir)/src/lib/ecore \ 5-I$(top_builddir)/src/lib/ecore \
6@DIRECTFB_CFLAGS@ @EINA_CFLAGS@ 6@DIRECTFB_CFLAGS@ @EINA_CFLAGS@ @EFL_ECORE_BUILD@
7 7
8lib_LTLIBRARIES = libecore_directfb.la 8lib_LTLIBRARIES = libecore_directfb.la
9includes_HEADERS = Ecore_DirectFB.h 9includes_HEADERS = Ecore_DirectFB.h
diff --git a/legacy/ecore/src/lib/ecore_evas/Makefile.am b/legacy/ecore/src/lib/ecore_evas/Makefile.am
index cd7f37beea..1828096244 100644
--- a/legacy/ecore/src/lib/ecore_evas/Makefile.am
+++ b/legacy/ecore/src/lib/ecore_evas/Makefile.am
@@ -107,7 +107,8 @@ $(ECORE_IPC_INC) \
107@EVAS_CFLAGS@ \ 107@EVAS_CFLAGS@ \
108@EINA_CFLAGS@ \ 108@EINA_CFLAGS@ \
109@EVIL_CFLAGS@ \ 109@EVIL_CFLAGS@ \
110@WAYLAND_EGL_CFLAGS@ 110@WAYLAND_EGL_CFLAGS@ \
111@EFL_ECORE_BUILD@
111 112
112AM_CFLAGS = @WIN32_CFLAGS@ 113AM_CFLAGS = @WIN32_CFLAGS@
113 114
diff --git a/legacy/ecore/src/lib/ecore_fb/Makefile.am b/legacy/ecore/src/lib/ecore_fb/Makefile.am
index 9129fec000..3af625a446 100644
--- a/legacy/ecore/src/lib/ecore_fb/Makefile.am
+++ b/legacy/ecore/src/lib/ecore_fb/Makefile.am
@@ -5,8 +5,8 @@ AM_CPPFLAGS = \
5-I$(top_builddir)/src/lib/ecore \ 5-I$(top_builddir)/src/lib/ecore \
6-I$(top_srcdir)/src/lib/ecore_input \ 6-I$(top_srcdir)/src/lib/ecore_input \
7@TSLIB_CFLAGS@ \ 7@TSLIB_CFLAGS@ \
8@EINA_CFLAGS@ 8@EINA_CFLAGS@ \
9 9@EFL_ECORE_BUILD@
10 10
11lib_LTLIBRARIES = libecore_fb.la 11lib_LTLIBRARIES = libecore_fb.la
12includes_HEADERS = Ecore_Fb.h 12includes_HEADERS = Ecore_Fb.h
diff --git a/legacy/ecore/src/lib/ecore_file/Makefile.am b/legacy/ecore/src/lib/ecore_file/Makefile.am
index ab23ace4f5..e3cb74ab43 100644
--- a/legacy/ecore/src/lib/ecore_file/Makefile.am
+++ b/legacy/ecore/src/lib/ecore_file/Makefile.am
@@ -8,7 +8,8 @@ AM_CPPFLAGS = \
8@CURL_CFLAGS@ \ 8@CURL_CFLAGS@ \
9@EVIL_CFLAGS@ \ 9@EVIL_CFLAGS@ \
10@EINA_CFLAGS@ \ 10@EINA_CFLAGS@ \
11@WIN32_CPPFLAGS@ 11@WIN32_CPPFLAGS@ \
12@EFL_ECORE_BUILD@
12 13
13AM_CFLAGS = @WIN32_CFLAGS@ 14AM_CFLAGS = @WIN32_CFLAGS@
14 15
diff --git a/legacy/ecore/src/tests/Makefile.am b/legacy/ecore/src/tests/Makefile.am
index bfd20d9069..217f5f80f9 100644
--- a/legacy/ecore/src/tests/Makefile.am
+++ b/legacy/ecore/src/tests/Makefile.am
@@ -5,7 +5,8 @@ AM_CPPFLAGS = \
5-I$(top_srcdir)/src/lib/ecore_con \ 5-I$(top_srcdir)/src/lib/ecore_con \
6-I$(top_srcdir)/src/lib/ecore_x \ 6-I$(top_srcdir)/src/lib/ecore_x \
7@EINA_CFLAGS@ \ 7@EINA_CFLAGS@ \
8@CHECK_CFLAGS@ 8@CHECK_CFLAGS@ \
9@EFL_ECORE_BUILD@
9 10
10if EFL_ENABLE_TESTS 11if EFL_ENABLE_TESTS
11 12