mirror of
https://github.com/clearlinux/bsdiff.git
synced 2026-09-05 13:21:32 +00:00
Provide configure option to disable tests
Building the tests is enabled by default, but because the test suite requires root privileges to run at the moment, people should have to option to disable the tests entirely. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
@@ -103,9 +103,11 @@ install-exec-hook:
|
||||
perl findstatic.pl */*.o | grep -v Checking ||:
|
||||
|
||||
TEST_EXTENSIONS = .sh
|
||||
if ENABLE_TESTS
|
||||
TESTS = $(dist_check_SCRIPTS)
|
||||
dist_check_SCRIPTS = \
|
||||
test/run.sh
|
||||
endif
|
||||
|
||||
release:
|
||||
@git rev-parse v$(PACKAGE_VERSION) &> /dev/null; \
|
||||
|
||||
@@ -33,6 +33,11 @@ AS_IF([test "$enable_lzma" != "no"], [
|
||||
])
|
||||
AM_CONDITIONAL([ENABLE_LZMA], [test "$enable_lzma" != "no"])
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[tests],
|
||||
[AS_HELP_STRING([--disable-tests], [Do not enable functional tests (enabled by default)])]
|
||||
)
|
||||
|
||||
have_coverage=no
|
||||
AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
|
||||
if test "x$enable_coverage" = "xyes" ; then
|
||||
@@ -52,6 +57,13 @@ if test "x$enable_coverage" = "xyes" ; then
|
||||
fi
|
||||
AM_CONDITIONAL([COVERAGE], [test "$have_coverage" = "yes"])
|
||||
|
||||
AS_IF([test "$enable_tests" != "no"], [
|
||||
AC_PATH_PROG([have_valgrind], [valgrind])
|
||||
AS_IF([test -z "${have_valgrind}"], [
|
||||
AC_MSG_ERROR([Must have valgrind installed to run functional tests])
|
||||
])
|
||||
])
|
||||
AM_CONDITIONAL([ENABLE_TESTS], [test "$enable_tests" != "no"])
|
||||
|
||||
AC_CONFIG_FILES([Makefile data/bsdiff.pc])
|
||||
AC_OUTPUT
|
||||
|
||||
Reference in New Issue
Block a user