diff --git a/configure.ac b/configure.ac index aff1b7ca72..f54f5f8270 100644 --- a/configure.ac +++ b/configure.ac @@ -572,6 +572,8 @@ case $host_os in ;; esac +AM_CONDITIONAL(BUILD_UNITTESTS, test x$supports_unittests = xyes) + # In order to detect support of sendmmsg(), we need to escape the POSIX # jail by defining _GNU_SOURCE or will not expose it. case $host_os in @@ -580,15 +582,6 @@ case $host_os in ;; esac -dnl Build unit tests when option --enable-debug is given. -if test "x$want_debug" = "xyes" && - test "x$supports_unittests" = "xyes"; then - want_unittests=yes -else - want_unittests=no -fi -AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes) - dnl Apply curl debug options to test servers OPT_SERVER_DEBUG="default" AC_ARG_ENABLE(server-debug, diff --git a/lib/altsvc.c b/lib/altsvc.c index c4dca59f3d..77bbbdb88e 100644 --- a/lib/altsvc.c +++ b/lib/altsvc.c @@ -438,7 +438,7 @@ static void altsvc_flush(struct altsvcinfo *asi, enum alpnid srcalpnid, } } -#ifdef DEBUGBUILD +#if defined(DEBUGBUILD) || defined(UNITTESTS) /* to play well with debug builds, we can *set* a fixed time this will return */ static time_t altsvc_debugtime(void *unused) diff --git a/tests/runtests.pl b/tests/runtests.pl index ae2e5fef81..947e5b4790 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -804,7 +804,7 @@ sub checksystemfeatures { } close($manh); - $feature{"unittest"} = $feature{"Debug"}; + $feature{"unittest"} = 1; $feature{"nghttpx"} = !!$ENV{'NGHTTPX'}; $feature{"nghttpx-h3"} = !!$nghttpx_h3;