Add coveralls.io integration.
This commit is contained in:
10
.travis.yml
10
.travis.yml
@ -26,7 +26,7 @@ before_install:
|
||||
esac
|
||||
|
||||
install:
|
||||
- pip install --user cram
|
||||
- pip install --user cram cpp-coveralls
|
||||
- >
|
||||
case "${TRAVIS_OS_NAME:-linux}" in
|
||||
osx)
|
||||
@ -35,4 +35,10 @@ install:
|
||||
;;
|
||||
esac
|
||||
|
||||
script: ./autogen.sh && ./configure --with-mysql --with-pgsql && make && make test
|
||||
script:
|
||||
- ./autogen.sh && ./configure --enable-coverage --with-mysql --with-pgsql
|
||||
- make
|
||||
- make test
|
||||
|
||||
after_success:
|
||||
- coveralls --gcov-options '\-lp'
|
||||
|
||||
29
configure.ac
29
configure.ac
@ -69,6 +69,7 @@ then
|
||||
CFLAGS="-ggdb3 ${CFLAGS}"
|
||||
DEBUG_CFLAGS="-O0"
|
||||
OPTIMIZE_CFLAGS="-O2"
|
||||
GCOV_CFLAGS="-O0 --coverage"
|
||||
fi
|
||||
if test "$SUNCC" = "yes"
|
||||
then
|
||||
@ -90,6 +91,7 @@ then
|
||||
CFLAGS="-g -mt ${IS_64} ${MEMALIGN_FLAGS} ${CFLAGS}"
|
||||
DEBUG_CFLAGS="-xO0"
|
||||
OPTIMIZE_CFLAGS="-xO2 -xlibmil -xdepend -Xa -mt -xstrconst"
|
||||
# TODO: Set flags for Gcov-enabled builds, if supported by Sun Studio
|
||||
fi
|
||||
|
||||
|
||||
@ -330,14 +332,6 @@ AC_ARG_WITH([debug],
|
||||
[Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
|
||||
[with_debug=$withval],
|
||||
[with_debug=no])
|
||||
if test "$with_debug" = "yes"
|
||||
then
|
||||
# Debugging. No optimization.
|
||||
CFLAGS="${DEBUG_CFLAGS} -DDEBUG ${CFLAGS}"
|
||||
else
|
||||
# Optimized version. No debug
|
||||
CFLAGS="${OPTIMIZE_CFLAGS} ${CFLAGS}"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([profiling],
|
||||
[AS_HELP_STRING([--enable-profiling],
|
||||
@ -382,6 +376,19 @@ AC_ARG_ENABLE([go-crazy],
|
||||
[ac_warn_go_crazy="$enableval"],
|
||||
[ac_warn_go_crazy="no"])
|
||||
|
||||
if test "$with_debug" = "yes"
|
||||
then
|
||||
# Debugging. No optimization.
|
||||
CFLAGS="${DEBUG_CFLAGS} -DDEBUG ${CFLAGS}"
|
||||
elif test "$ac_coverage" = "yes"
|
||||
then
|
||||
# Gcov-enabled build. No optimization.
|
||||
CFLAGS="${GCOV_CFLAGS} ${CFLAGS}"
|
||||
else
|
||||
# Optimized version. No debug
|
||||
CFLAGS="${OPTIMIZE_CFLAGS} ${CFLAGS}"
|
||||
fi
|
||||
|
||||
if test "$GCC" = "yes"
|
||||
then
|
||||
if test "$ac_warn_fail" = "yes"
|
||||
@ -401,7 +408,7 @@ then
|
||||
|
||||
if test "$ac_coverage" = "yes"
|
||||
then
|
||||
GPROF_COVERAGE="-fprofile-arcs -ftest-coverage"
|
||||
GPROF_COVERAGE="--coverage"
|
||||
else
|
||||
GPROF_COVERAGE=" "
|
||||
fi
|
||||
@ -426,7 +433,7 @@ then
|
||||
W_CRAZY="-Wshadow -Wconversion"
|
||||
fi
|
||||
|
||||
CC_WARNINGS="${BASE_WARNINGS} ${W_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_CRAZY}"
|
||||
CC_WARNINGS="${BASE_WARNINGS} ${W_PEDANTIC} ${W_UNREACHABLE} ${W_CRAZY}"
|
||||
|
||||
NO_REDUNDANT_DECLS="-Wno-redundant-decls"
|
||||
CPPFLAGS="${CPPFLAGS}"
|
||||
@ -436,7 +443,7 @@ then
|
||||
CC_WARNINGS="-v -errtags=yes -errwarn=%all -erroff=E_INTEGER_OVERFLOW_DETECTED"
|
||||
fi
|
||||
|
||||
AM_CFLAGS="${CC_WARNINGS} ${AM_CFLAGS} ${PTHREAD_CFLAGS}"
|
||||
AM_CFLAGS="${CC_WARNINGS} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${AM_CFLAGS} ${PTHREAD_CFLAGS}"
|
||||
|
||||
AM_CPPFLAGS="${AM_CPPFLAGS} -I\$(top_srcdir)/sysbench"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user