1
0
Fork 0

added coverage config option

This commit is contained in:
Frank Celler 2012-04-12 15:51:49 +02:00
parent 66b8e54d8c
commit a831ba82f3
6 changed files with 86 additions and 4 deletions

2
.gitignore vendored
View File

@ -72,3 +72,5 @@ UnitTests/test_suite
VC++
UnitTests/HttpInterface/logs
Makefile.local
*.gcno
*.gcda

View File

@ -104,7 +104,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/configure.logging \
$(top_srcdir)/m4/configure.largefile \
$(top_srcdir)/m4/configure.threads \
$(top_srcdir)/m4/configure.dot $(top_srcdir)/m4/configure.flex \
$(top_srcdir)/m4/configure.dot \
$(top_srcdir)/m4/configure.coverage \
$(top_srcdir)/m4/configure.flex \
$(top_srcdir)/m4/configure.bison \
$(top_srcdir)/m4/external.math \
$(top_srcdir)/m4/external.ncurses \
@ -402,6 +404,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GCOV_CFLAGS = @GCOV_CFLAGS@
GCOV_CXXFLAGS = @GCOV_CXXFLAGS@
GCOV_LDFLAGS = @GCOV_LDFLAGS@
GCOV_LIBS = @GCOV_LIBS@
GREP = @GREP@
HAVE_DOT = @HAVE_DOT@
INSTALL = @INSTALL@
@ -898,7 +904,7 @@ VOCDIR := /tmp/vocdir.$(PID)
VOCPORT := $(shell printf "3%04d" `expr $(PID) % 10000`)
VOCHOST := 127.0.0.1
SERVER_OPT := --startup.directory ./js --startup.modules-path ./js/server/modules:./js/common/modules --action.system-directory ./js/action/system
CLIENT_OPT := --startup.directory ./js --startup.modules-path ./js/client/modules:./js/common/modules
CLIENT_OPT := --startup.directory ./js --startup.modules-path ./js/client/modules:./js/common/modules --no-colors
@ENABLE_BOOST_TEST_TRUE@UnitTests_test_suite_LDADD = -L@top_builddir@ -lavocado -lboost_unit_test_framework
@ENABLE_BOOST_TEST_TRUE@UnitTests_test_suite_DEPENDENCIES = @top_builddir@/libavocado.a
@ENABLE_BOOST_TEST_TRUE@UnitTests_test_suite_SOURCES = \

View File

@ -32,7 +32,7 @@ VOCDIR := /tmp/vocdir.$(PID)
VOCPORT := $(shell printf "3%04d" `expr $(PID) % 10000`)
VOCHOST := 127.0.0.1
SERVER_OPT := --startup.directory ./js --startup.modules-path ./js/server/modules:./js/common/modules --action.system-directory ./js/action/system
CLIENT_OPT := --startup.directory ./js --startup.modules-path ./js/client/modules:./js/common/modules
CLIENT_OPT := --startup.directory ./js --startup.modules-path ./js/client/modules:./js/common/modules --no-colors
.PHONY: start-server

View File

@ -46,7 +46,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/configure.logging \
$(top_srcdir)/m4/configure.largefile \
$(top_srcdir)/m4/configure.threads \
$(top_srcdir)/m4/configure.dot $(top_srcdir)/m4/configure.flex \
$(top_srcdir)/m4/configure.dot \
$(top_srcdir)/m4/configure.coverage \
$(top_srcdir)/m4/configure.flex \
$(top_srcdir)/m4/configure.bison \
$(top_srcdir)/m4/external.math \
$(top_srcdir)/m4/external.ncurses \
@ -144,6 +146,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GCOV_CFLAGS = @GCOV_CFLAGS@
GCOV_CXXFLAGS = @GCOV_CXXFLAGS@
GCOV_LDFLAGS = @GCOV_LDFLAGS@
GCOV_LIBS = @GCOV_LIBS@
GREP = @GREP@
HAVE_DOT = @HAVE_DOT@
INSTALL = @INSTALL@

60
configure vendored
View File

@ -643,6 +643,12 @@ BISON
LEXLIB
LEX_OUTPUT_ROOT
LEX
GCOV_LIBS
GCOV_LDFLAGS
GCOV_CFLAGS
GCOV_CXXFLAGS
ENABLE_GCOV_FALSE
ENABLE_GCOV_TRUE
HAVE_DOT
DOT_PATH
PTHREAD_CFLAGS
@ -800,6 +806,7 @@ enable_timing
enable_figures
enable_largefile
with_dot
enable_gcov
enable_ncurses
enable_static_ncurses
enable_readline
@ -1477,6 +1484,7 @@ Optional Features:
--enable-timing enable timing (default: yes)
--enable-figures enable figures (default: yes)
--disable-largefile omit support for large files
--enable-gcov enables gnu coverage (default: no)
--enable-curses enable ncurses support (default:
$tr_NCURSES_DEFAULT)
--enable-static-ncurses using static library 'ncurses' (default: no)
@ -6522,6 +6530,54 @@ else
fi
# Check whether --enable-gcov was given.
if test "${enable_gcov+set}" = set; then :
enableval=$enable_gcov; tr_COVERAGE="${enableval:-yes}"
else
tr_COVERAGE=no
fi
if test "x$tr_COVERAGE" = xyes; then
if test "x$GCC" = xyes; then
GCOV_CXXFLAGS="-fprofile-arcs -ftest-coverage"
GCOV_CFLAGS="-fprofile-arcs -ftest-coverage"
GCOV_LDFLAGS=""
GCOV_LIBS="-lgcov"
else
as_fn_error $? "do not how to enable coverage compilation" "$LINENO" 5
fi
fi
if test "x$tr_COVERAGE" = xyes; then
ENABLE_GCOV_TRUE=
ENABLE_GCOV_FALSE='#'
else
ENABLE_GCOV_TRUE='#'
ENABLE_GCOV_FALSE=
fi
CFLAGS="${CFLAGS} ${GCOV_CFLAGS}"
CXXFLAGS="${CXXFLAGS} ${GCOV_CXXFLAGS}"
LDFLAGS="${LDFLAGS} ${GCOV_LDFLAGS}"
LIBS="${LIBS} ${GCOV_LIBS} "
if test "x$tr_COVERAGE" = xyes; then
FLAG_INFO="$FLAG_INFO|GCOV_CXXFLAGS: ${GCOV_CXXFLAGS}"
FLAG_INFO="$FLAG_INFO|GCOV_LDFLAGS: ${GCOV_LDFLAGS}"
FLAG_INFO="$FLAG_INFO|GCOV_LIBS: ${GCOV_LIBS}"
fi
if test "x$tr_FLEX" = xyes; then
@ -9493,6 +9549,10 @@ if test -z "${ENABLE_FIGURES_TRUE}" && test -z "${ENABLE_FIGURES_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_FIGURES\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_GCOV_TRUE}" && test -z "${ENABLE_GCOV_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_GCOV\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_FLEX_TRUE}" && test -z "${ENABLE_FLEX_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_FLEX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5

View File

@ -19,6 +19,7 @@ dnl ============================================================================
dnl OPTIONS BISON, FLEX, ALL-IN-ONE, PATH
dnl ============================================================================
dnl BISON
AC_ARG_ENABLE(bison,
AS_HELP_STRING([--enable-bison], [enable BISON]),
[tr_BISON="${enableval:-yes}"],
@ -29,6 +30,7 @@ AM_CONDITIONAL(ENABLE_BISON, test "x$tr_BISON" = xyes)
dnl FLEX
AC_ARG_ENABLE(flex,
AS_HELP_STRING([--enable-flex], [enable FLEX]),
[tr_FLEX="${enableval:-yes}"],
@ -39,6 +41,7 @@ AM_CONDITIONAL(ENABLE_FLEX, test "x$tr_FLEX" = xyes)
dnl ALL-IN-ONE
AC_ARG_ENABLE(all-in-one,
AS_HELP_STRING([--enable-all-in-one], [use supplied V8, LIBEV from 3rdParty directory]),
[tr_ALL_IN_ONE="${enableval:-yes}"],
@ -49,6 +52,7 @@ AM_CONDITIONAL(ENABLE_ALL_IN_ONE, test "x$tr_ALL_IN_ONE" = xyes)
dnl BOOST
AC_ARG_ENABLE(included-boost,
AS_HELP_STRING([--enable-included-boost], [use supplied BOOST from 3rdParty directory]),
[tr_INCLUDED_BOOST="${enableval:-yes}"],
@ -59,6 +63,7 @@ AM_CONDITIONAL(ENABLE_INCLUDED_BOOST, test "x$tr_INCLUDED_BOOST" = xyes)
dnl INSTALL EMPTY DATABASE
AC_ARG_ENABLE(install-dbdir,
AS_HELP_STRING([--enable-install-dbdir], [install an empty database directory]),
[tr_DBDIR="${enableval:-yes}"],
@ -69,6 +74,7 @@ AM_CONDITIONAL(ENABLE_INSTALL_DBDIR, test "x$tr_DBDIR" = xyes)
dnl RELATIVE PATH
AC_ARG_ENABLE(relative,
AS_HELP_STRING([--enable-relative], [all path are relative to the binary (yes/no/devel [default])]),
[tr_RELATIVE="${enableval:-devel}"],
@ -87,6 +93,7 @@ fi
dnl BOOST TEST
AC_ARG_WITH([boost-test],
AS_HELP_STRING([--with-boost-test], [use boost unit test framework]),
[tr_BOOST_TEST=yes],
@ -108,6 +115,7 @@ m4_include([m4/configure.logging])
m4_include([m4/configure.largefile])
m4_include([m4/configure.threads])
m4_include([m4/configure.dot])
m4_include([m4/configure.coverage])
if test "x$tr_FLEX" = xyes; then
m4_include([m4/configure.flex])