summaryrefslogtreecommitdiff
path: root/legacy/eet/m4/efl_tests.m4
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/m4/efl_tests.m4
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 '')
-rw-r--r--legacy/eet/m4/efl_tests.m428
1 files changed, 25 insertions, 3 deletions
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