It would be mighty fine if these kind of changes are communicated beforehand
or if you update the buildbot Makefiles as well (you did write them once,
didn't you?).

If I hadn't noticed this commit at the same time Stefan noticed that the
tests on buildbot are not run anymore you would have sent us on a wild goose
chase that would have been unnecessary and wasted time.


Regards,
Daniel

-----Original Message-----
From: Enlightenment SVN [mailto:[email protected]] 
Sent: 20 December 2012 21:44
To: [email protected]
Subject: E SVN: barbieri trunk/efl

Log:
efl/configure: add --with-tests=regular|coverage|none
  
  also make 'check' mandatory if enabled.
  
  

Author:       barbieri
Date:         2012-12-20 13:43:53 -0800 (Thu, 20 Dec 2012)
New Revision: 81491
Trac:         http://trac.enlightenment.org/e/changeset/81491

Modified:
  trunk/efl/configure.ac 

Modified: trunk/efl/configure.ac
===================================================================
--- trunk/efl/configure.ac      2012-12-20 21:41:56 UTC (rev 81490)
+++ trunk/efl/configure.ac      2012-12-20 21:43:53 UTC (rev 81491)
@@ -92,18 +92,31 @@
      ;;
 esac
 
-AC_ARG_ENABLE([coverage],
-   [AC_HELP_STRING([--enable-coverage], [enable unit testing coverage.
@<:@default=disabled@:>@])],
-   [
-    if test "x${enableval}" = "xyes" ; then
-       want_coverage="yes"
-    else
-       want_coverage="no"
-    fi
-   ],
-   [want_coverage="no"])
+AC_ARG_WITH([tests],
+   [AC_HELP_STRING([--with-tests=none|regular|coverage],
+                   [choose testing method: regular, coverage or none.
+                    @<:@default=none@:>@])],
+   [build_tests=${withval}],
+   [build_tests=none])
 
+want_coverage="no"
+want_tests="no"
+case "${build_tests}" in
+   regular)
+     want_tests="yes"
+     ;;
+   coverage)
+     want_tests="yes"
+     want_coverage="yes"
+     ;;
+   none)
+     ;;
+   *)
+     AC_MSG_ERROR([Unknown build tests option:
--with-tests=${build_tests}])
+     ;;
+esac
 
+
 #### Default values
 
 platform_pc=""
@@ -422,8 +435,7 @@
 
 # lcov
 
-_efl_enable_coverage="no"
-if test "x${want_coverage}" = "xyes" ; then
+if test "${want_coverage}" = "yes" ; then
    AC_CHECK_PROG([have_lcov], [lcov], [yes], [no])
    if test "x${have_lcov}" = "xyes" ; then
       EFL_COV_CFLAGS="${EFL_COV_CFLAGS} -fprofile-arcs -ftest-coverage"
@@ -433,13 +445,12 @@
       else
          EFL_COV_CFLAGS="${EFL_COV_CFLAGS} -g -O0 -DDEBUG"
       fi
-      _efl_enable_coverage="yes"
    else
-      AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
+      AC_MSG_ERROR([lcov is not found])
    fi
 fi
 
-AM_CONDITIONAL([EFL_ENABLE_COVERAGE], [test "x${_efl_enable_coverage}" =
"xyes"])
+AM_CONDITIONAL([EFL_ENABLE_COVERAGE], [test "${want_coverage}" = 
+"yes"])
 
 AC_SUBST([EFL_COV_CFLAGS])
 AC_SUBST([EFL_COV_LIBS])
@@ -449,14 +460,12 @@
 
 # check unit testing library
 
-PKG_CHECK_MODULES([CHECK],
-   [check >= 0.9.5],
-   [_efl_enable_tests="yes"],
-   [_efl_enable_tests="no"])
+if test "${want_tests}" = "yes"; then
+   PKG_CHECK_MODULES([CHECK], [check >= 0.9.5]) fi 
+AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "${want_tests}" = "yes"])
 
-AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "x${_efl_enable_tests}" = "xyes"])
 
-
 # check for crypto/tls library to use
 case "$build_crypto" in
    gnutls)
@@ -3587,11 +3596,8 @@
 echo "    SndFile....................: $use_sndfile"
 fi
 echo
-echo "Tests..................: ${_efl_enable_tests}"
-if test "x${_efl_enable_tests}" = "xyes"; then
-echo "    Coverage...........: ${_efl_enable_coverage}"
-echo "    Build and run......: make check"
-fi
+echo "Tests..................: ${with_tests}"
+
 echo "Examples...............: make examples"
 echo "    installation.......: make install-examples"
 if test "x${build_doc}" = "xyes"; then




------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to