summaryrefslogtreecommitdiff
path: root/legacy/eet
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-07-01 12:01:46 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-07-01 12:01:46 +0000
commitb415c1dd55025dcba746043a656c0dbb885a2b96 (patch)
treeb6c90cd0ed007ca128eff8b10a33e389d63463f5 /legacy/eet
parent5859a1ded55f5ae9bbd253e81a1f93b5c0151a18 (diff)
Eet: remove --enable-coverage option.
Now, coverage is detected with just --enable-tests. Buildbot maintainers : please remove --enable-coverage option to eet (more EFL will be supported later) SVN revision: 73108
Diffstat (limited to 'legacy/eet')
-rw-r--r--legacy/eet/Makefile.am35
-rw-r--r--legacy/eet/configure.ac21
-rw-r--r--legacy/eet/m4/efl_coverage.m462
-rw-r--r--legacy/eet/m4/efl_tests.m428
4 files changed, 43 insertions, 103 deletions
diff --git a/legacy/eet/Makefile.am b/legacy/eet/Makefile.am
index 78b226a991..79b2a28176 100644
--- a/legacy/eet/Makefile.am
+++ b/legacy/eet/Makefile.am
@@ -36,7 +36,6 @@ m4/ac_path_generic.m4 \
36m4/efl_binary.m4 \ 36m4/efl_binary.m4 \
37m4/efl_check_funcs.m4 \ 37m4/efl_check_funcs.m4 \
38m4/efl_check_libs.m4 \ 38m4/efl_check_libs.m4 \
39m4/efl_coverage.m4 \
40m4/efl_doxygen.m4 \ 39m4/efl_doxygen.m4 \
41m4/efl_tests.m4 \ 40m4/efl_tests.m4 \
42m4/efl_path_max.m4 41m4/efl_path_max.m4
@@ -44,7 +43,7 @@ m4/efl_path_max.m4
44pkgconfigdir = $(libdir)/pkgconfig 43pkgconfigdir = $(libdir)/pkgconfig
45pkgconfig_DATA = eet.pc 44pkgconfig_DATA = eet.pc
46 45
47.PHONY: doc coverage 46.PHONY: doc
48 47
49# Documentation 48# Documentation
50 49
@@ -56,19 +55,6 @@ doc:
56 55
57if EFL_ENABLE_TESTS 56if EFL_ENABLE_TESTS
58 57
59check-local:
60 @./src/tests/eet_suite
61
62else
63
64check-local:
65 @echo "reconfigure with --enable-tests"
66
67endif
68
69# Coverage report
70
71if EFL_ENABLE_COVERAGE
72lcov-reset: 58lcov-reset:
73 @rm -rf $(top_builddir)/coverage 59 @rm -rf $(top_builddir)/coverage
74 @find $(top_builddir) -name "*.gcda" -delete 60 @find $(top_builddir) -name "*.gcda" -delete
@@ -81,20 +67,23 @@ lcov-report:
81 genhtml -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned.info 67 genhtml -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned.info
82 @echo "Coverage Report at $(top_builddir)/coverage/html" 68 @echo "Coverage Report at $(top_builddir)/coverage/html"
83 69
84coverage: 70check-local:
85 @$(MAKE) lcov-reset 71 @$(MAKE) lcov-reset
86 @$(MAKE) check 72 @./src/tests/eet_suite
87 @$(MAKE) lcov-report 73 @$(MAKE) lcov-report
88 74
89clean-local:
90 @rm -rf coverage
91else 75else
76
92lcov-reset: 77lcov-reset:
93 @echo "reconfigure with --enable-coverage" 78 @echo "reconfigure with --enable-tests"
94 79
95lcov-report: 80lcov-report:
96 @echo "reconfigure with --enable-coverage" 81 @echo "reconfigure with --enable-tests"
82
83check-local:
84 @echo "reconfigure with --enable-tests"
97 85
98coverage:
99 @echo "reconfigure with --enable-tests --enable-coverage"
100endif 86endif
87
88clean-local:
89 @rm -rf coverage
diff --git a/legacy/eet/configure.ac b/legacy/eet/configure.ac
index 852dc0493e..4f91427c66 100644
--- a/legacy/eet/configure.ac
+++ b/legacy/eet/configure.ac
@@ -186,19 +186,6 @@ AC_ARG_ENABLE([build-examples],
186 [build_examples="no"]) 186 [build_examples="no"])
187AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"]) 187AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
188 188
189# Unit tests, coverage and benchmarking
190
191EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
192EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
193
194if test "x${prefer_assert}" = "xno"; then
195 DEBUG_CFLAGS="-DNDEBUG"
196else
197# use debug symbols and set DEBUG if coverage support is enabled
198 DEBUG_CFLAGS="${EFL_DEBUG_CFLAGS}"
199fi
200AC_SUBST(DEBUG_CFLAGS)
201
202 189
203### Checks for programs 190### Checks for programs
204AC_PROG_CC 191AC_PROG_CC
@@ -492,6 +479,11 @@ AC_CHECK_FUNCS(fmemopen open_memstream realpath)
492EFL_CHECK_FUNCS([eet], [fnmatch]) 479EFL_CHECK_FUNCS([eet], [fnmatch])
493 480
494 481
482### Unit tests, coverage and benchmarking
483
484EFL_CHECK_TESTS([eet], [enable_tests="yes"], [enable_tests="no"])
485
486
495AC_SUBST([requirements_pc_eet]) 487AC_SUBST([requirements_pc_eet])
496AC_SUBST([requirements_libs_eet]) 488AC_SUBST([requirements_libs_eet])
497 489
@@ -530,8 +522,7 @@ fi
530echo 522echo
531echo " Old eet file format..: ${old_eet_file_format}" 523echo " Old eet file format..: ${old_eet_file_format}"
532echo 524echo
533echo " Tests................: ${enable_tests}" 525echo " Tests................: ${enable_tests} (Coverage: ${efl_enable_coverage})"
534echo " Coverage.............: ${enable_coverage}"
535echo 526echo
536echo " Build eet............: $have_eet" 527echo " Build eet............: $have_eet"
537echo 528echo
diff --git a/legacy/eet/m4/efl_coverage.m4 b/legacy/eet/m4/efl_coverage.m4
deleted file mode 100644
index 85d03215b3..0000000000
--- a/legacy/eet/m4/efl_coverage.m4
+++ /dev/null
@@ -1,62 +0,0 @@
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/eet/m4/efl_tests.m4 b/legacy/eet/m4/efl_tests.m4
index 3a4dfe246f..edd57f2199 100644
--- a/legacy/eet/m4/efl_tests.m4
+++ b/legacy/eet/m4/efl_tests.m4
@@ -1,14 +1,16 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr> 1dnl Copyright (C) 2008-2012 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied. 2dnl That code is public domain and can be freely used or copied.
3 3
4dnl Macro that check if tests programs are wanted and if yes, if 4dnl Macro that check if tests programs are wanted and if yes, if
5dnl the Check library is available. 5dnl the Check library is available.
6dnl the lcov program is available.
6 7
7dnl Usage: EFL_CHECK_TESTS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 8dnl Usage: EFL_CHECK_TESTS(EFL[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8dnl Define the automake conditionnal EFL_ENABLE_TESTS 9dnl Define the automake conditionnal EFL_ENABLE_TESTS
9 10
10AC_DEFUN([EFL_CHECK_TESTS], 11AC_DEFUN([EFL_CHECK_TESTS],
11[ 12[
13m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
12 14
13dnl configure option 15dnl configure option
14 16
@@ -35,9 +37,29 @@ if test "x${_efl_enable_tests}" = "xyes" ; then
35 [_efl_enable_tests="no"]) 37 [_efl_enable_tests="no"])
36fi 38fi
37 39
40efl_enable_coverage="no"
41if test "x${_efl_enable_tests}" = "xyes" ; then
42 AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
43 if test "x$have_lcov" = "xyes" ; then
44 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -fprofile-arcs -ftest-coverage"
45 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -lgcov"
46# remove any optimisation flag and force debug symbols
47 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -g -O0 -DDEBUG"
48 efl_enable_coverage="yes"
49 else
50 AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
51 fi
52fi
53
54dnl Substitution
55AC_SUBST(EFL_COVERAGE_CFLAGS)
56AC_SUBST(EFL_COVERAGE_LIBS)
57
38AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes") 58AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
39 59
40AS_IF([test "x$_efl_enable_tests" = "xyes"], [$1], [$2]) 60AS_IF([test "x$_efl_enable_tests" = "xyes"], [$2], [$3])
61
62m4_popdef([UPEFL])
41]) 63])
42 64
43dnl End of efl_tests.m4 65dnl End of efl_tests.m4