Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable timed dependant tests #54

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -3121,6 +3121,14 @@ AC_MSG_RESULT($ipv6_result)

AC_SUBST(have_ipv6)

AC_ARG_ENABLE(timed-tests,
[ --disable-timed-tests Disable timed tests ],
[apr_has_timed_tests=$enableval], [apr_has_timed_tests=yes]
)
AS_IF([test "x$apr_has_timed_tests" != xno],
[AC_DEFINE([APR_HAVE_TIME_DEPENDANT_TESTS], [1], [Whether timed tests should be enabled.])]
)

# hstrerror is only needed if IPv6 is not enabled,
# so getaddrinfo/gai_strerror are not used.
if test $have_ipv6 = 0; then
Expand Down
2 changes: 1 addition & 1 deletion test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CLEAN_TARGETS = testfile.tmp lfstests/*.bin \
CLEAN_SUBDIRS = internal

INCDIR=../include
INCLUDES=-I$(INCDIR) -I$(srcdir)/../include
INCLUDES=-I$(INCDIR) -I$(srcdir)/../include -I$(srcdir)/../include/arch/@DEFAULT_OSDIR@

# link programs using -no-install to get real executables not
# libtool wrapper scripts which link an executable when first run.
Expand Down
5 changes: 5 additions & 0 deletions test/testlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "apr_general.h"
#include "apr_getopt.h"
#include "apr_atomic.h"
#include "apr_private.h"
#include "testutil.h"

#if APR_HAS_THREADS
Expand Down Expand Up @@ -551,13 +552,17 @@ abts_suite *testlock(abts_suite *suite)
abts_run_test(suite, threads_not_impl, NULL);
#else
abts_run_test(suite, test_thread_mutex, NULL);
#if APR_HAVE_TIME_DEPENDANT_TESTS
abts_run_test(suite, test_thread_timedmutex, NULL);
#endif
abts_run_test(suite, test_thread_nestedmutex, NULL);
abts_run_test(suite, test_thread_unnestedmutex, NULL);
abts_run_test(suite, test_thread_rwlock, NULL);
abts_run_test(suite, test_cond, NULL);
abts_run_test(suite, test_timeoutcond, NULL);
#if APR_HAVE_TIME_DEPENDANT_TESTS
abts_run_test(suite, test_timeoutmutex, NULL);
#endif
#ifdef WIN32
abts_run_test(suite, test_win32_abandoned_mutex, NULL);
#endif
Expand Down