summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5d5c1b0)
raw | patch | inline | side by side (parent: 5d5c1b0)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 30 Apr 2014 21:16:12 +0000 (23:16 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 30 Apr 2014 21:16:12 +0000 (23:16 +0200) |
Makefile.am | patch | blob | history | |
README | patch | blob | history | |
configure.ac | patch | blob | history | |
t/Makefile.am | patch | blob | history |
diff --git a/Makefile.am b/Makefile.am
index 10794f018ddcfba68f41c0a060be6318ec392654..92c89f69c604507cee4a115d1a993bb64bec4961 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
if BUILD_DOCUMENTATION
SUBDIRS += doc
endif
-if BUILD_TESTING
SUBDIRS += t
-endif
EXTRA_DIST = autogen.sh version-gen.sh
index 92193efea7e2ff3eff2c24ca208814c32cc1732d..a737ebc07900611427eea606e0fd773ecd5ac1e4 100644 (file)
--- a/README
+++ b/README
library. It used used to mock I/O related functions. In case this function
is not available, the respective tests will be disabled automatically.
- The integration tests require valgrind and chrpath.
+ The integration tests require valgrind and chrpath. If any of these are not
+ available, integration tests will be disabled automatically.
For the latest build status, see:
<https://travis-ci.org/tokkee/sysdb>
diff --git a/configure.ac b/configure.ac
index 420021f628ab81d61a4e898fe1acdc6c3d173f2a..7b8d801dbb04c3b10c0b373074e18e781e94d448 100644 (file)
--- a/configure.ac
+++ b/configure.ac
dnl Testing.
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],
- [build_testing="yes"], [build_testing="no"])
+ [unit_tests="yes"], [unit_tests="no"])
AC_CHECK_HEADERS(libgen.h)
fi
AC_SUBST([A2X])
+integration_tests="yes"
+AC_PATH_PROG([VALGRIND], [valgrind])
+AC_PATH_PROG([CHRPATH], [chrpath])
+if test "x$VALGRIND" = "x" || test "x$CHRPATH" = "x"; then
+ integration_tests="no (missing valgrind and/or chrpath)"
+fi
+AM_CONDITIONAL([INTEGRATION_TESTING], test "x$integration_tests" = "xyes")
+
dnl Plugin checks.
puppet_storeconfigs_default=$with_libdbi
if test "x$puppet_storeconfigs_default" != "xyes"; then
[plugin logging to syslog])
AM_CONDITIONAL([BUILD_DOCUMENTATION], test "x$build_documentation" = "xyes")
-AM_CONDITIONAL([BUILD_TESTING], test "x$build_testing" = "xyes")
+AM_CONDITIONAL([UNIT_TESTING], test "x$unit_tests" = "xyes")
AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile
src/liboconfig/Makefile t/Makefile])
AC_MSG_RESULT()
AC_MSG_RESULT([ Features:])
AC_MSG_RESULT([ documentation: . . . . . . $build_documentation])
-AC_MSG_RESULT([ unit testing: . . . . . . . $build_testing])
+AC_MSG_RESULT([ unit testing: . . . . . . . $unit_tests])
AC_MSG_RESULT([ stdio mocking: . . . . . $have_fopencookie])
AC_MSG_RESULT([ coverage testing: . . . . . $enable_gcov])
+AC_MSG_RESULT([ integration testing: . . . $integration_tests])
AC_MSG_RESULT()
AC_MSG_RESULT([ Libraries:])
AC_MSG_RESULT([ libdbi: . . . . . . . . . . $with_libdbi])
diff --git a/t/Makefile.am b/t/Makefile.am
index 971b58126d1d756e8fba5f13e5be4977f74a519d..bfeadcfc13d7cab9485c6ae20eaa310b99f46e1e 100644 (file)
--- a/t/Makefile.am
+++ b/t/Makefile.am
# unit tests
#
+if UNIT_TESTING
TESTS += unit/libsysdb_test unit/libsysdb_net_test
check_PROGRAMS += unit/libsysdb_test unit/libsysdb_net_test
+endif
unit_libsysdb_test_SOURCES = \
unit/libsysdb_test.c unit/libsysdb_test.h \
# integration tests
#
+if INTEGRATION_TESTING
TESTS += integration/simple_config.sh integration/simple_query.sh
+endif
noinst_LTLIBRARIES += integration/mock_plugin.la
integration_mock_plugin_la_SOURCES = integration/mock_plugin.c