Perform unit tests only if check is installed
This commit is contained in:
parent
859a9d87c3
commit
bb7b7a3374
@ -67,5 +67,9 @@ SUBDIRS = \
|
||||
tests \
|
||||
tools
|
||||
|
||||
if PERFORM_UNIT_TESTS
|
||||
SUBDIRS += tests
|
||||
endif
|
||||
|
||||
distclean-local:
|
||||
-rm -f xrdp_configure_options.h
|
||||
|
19
configure.ac
19
configure.ac
@ -357,9 +357,20 @@ AC_CHECK_HEADER([X11/extensions/Xrandr.h], [],
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
# checking for libcheck (used for unit testing)
|
||||
PKG_CHECK_MODULES([CHECK], [check >= 0.10.0], [],
|
||||
[AC_MSG_ERROR([please install check])])
|
||||
# perform unit tests if libcheck found
|
||||
PKG_CHECK_MODULES([CHECK], [check >= 0.10.0],
|
||||
[perform_unit_tests=yes],
|
||||
[perform_unit_tests=no])
|
||||
|
||||
if test "x$perform_unit_tests" == "xyes"; then
|
||||
AC_MSG_NOTICE([libcheck found, unit tests will be performed])
|
||||
else
|
||||
AC_MSG_NOTICE([libcheck not found, unit tests will be skipped])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(PERFORM_UNIT_TESTS,
|
||||
[test "x$perform_unit_tests" = "xyes"])
|
||||
# -- end perform unit tests
|
||||
|
||||
AC_SUBST([moduledir], '${libdir}/xrdp')
|
||||
|
||||
@ -443,6 +454,8 @@ echo " libdir $libdir"
|
||||
echo " bindir $bindir"
|
||||
echo " sysconfdir $sysconfdir"
|
||||
echo ""
|
||||
echo " perform unit tests $perform_unit_tests"
|
||||
echo ""
|
||||
echo " CFLAGS = $CFLAGS"
|
||||
echo " LDFLAGS = $LDFLAGS"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user