commit b5bf6ccf78412974d3ab0be3ec262dae3d8e0443
parent 8f66b6e03625e8b429ad61cf702dc5edf8099964
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Sun, 24 Jan 2021 21:30:10 +0300
configure: added '--enable-heavy-tests'
Some tests may fail because of too intensive usage of OS resources.
Skip by default resources-heavy tests so testsute can be run on
a machine with some parallel activity.
Diffstat:
2 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -933,6 +933,14 @@ AC_ARG_ENABLE([[examples]],
test "x$enable_examples" = "xno" || enable_examples=yes
AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" = "xyes"])
+AC_ARG_ENABLE([[heavy-tests]],
+ [AS_HELP_STRING([[--enable-heavy-tests]], [use heavy tests in test-suite. WARNING:]
+ [a dedicated host with minimal number of background processes and no network]
+ [activity is recommended to enable.])], [],
+ [enable_heavy_tests=no])
+AS_VAR_IF([enable_heavy_tests], ["yes"], [], [enable_heavy_tests=no])
+AM_CONDITIONAL([HEAVY_TESTS],[test "x$enable_heavy_tests" = "xyes"])
+
AC_ARG_ENABLE([[poll]],
[AS_HELP_STRING([[--enable-poll[=ARG]]], [enable poll support (yes, no, auto) [auto]])],
[enable_poll=${enableval}],
diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am
@@ -1,4 +1,6 @@
# This Makefile.am is in the public domain
+EMPTY_ITEM =
+
SUBDIRS = .
if USE_COVERAGE
@@ -23,15 +25,35 @@ THREAD_ONLY_TESTS = \
test_long_header11 \
test_iplimit11 \
test_termination \
+ $(EMPTY_ITEM)
+
+if HEAVY_TESTS
+THREAD_ONLY_TESTS += \
test_add_conn_cleanup \
test_add_conn_cleanup_nolisten \
- test_timeout
+ $(EMPTY_ITEM)
+endif
+
+THREAD_ONLY_TESTS += \
+ test_timeout \
+ $(EMPTY_ITEM)
if HAVE_POSIX_THREADS
+if HEAVY_TESTS
THREAD_ONLY_TESTS += \
perf_get_concurrent11 \
+ $(EMPTY_ITEM)
+endif
+
+THREAD_ONLY_TESTS += \
test_quiesce \
- test_concurrent_stop
+ $(EMPTY_ITEM)
+
+if HEAVY_TESTS
+THREAD_ONLY_TESTS += \
+ test_concurrent_stop \
+ $(EMPTY_ITEM)
+endif
if HAVE_CURL_BINARY
THREAD_ONLY_TESTS += \
@@ -46,11 +68,13 @@ THREAD_ONLY_TESTS += \
test_digestauth_with_arguments
endif
+if HEAVY_TESTS
if HAVE_POSIX_THREADS
THREAD_ONLY_TESTS += \
perf_get_concurrent
endif
-
+endif
+
if HAVE_CURL
check_PROGRAMS = \
test_get \
@@ -73,7 +97,12 @@ check_PROGRAMS = \
test_get_chunked \
test_put_chunked \
test_callback \
+ $(EMPTY_ITEM)
+
+if HEAVY_TESTS
+check_PROGRAMS += \
perf_get
+endif
if HAVE_POSTPROCESSOR
check_PROGRAMS += \
@@ -85,11 +114,13 @@ if HAVE_POSTPROCESSOR
test_post_loop11
endif
+if HEAVY_TESTS
if HAVE_FORK_WAITPID
if HAVE_CURL_BINARY
check_PROGRAMS += test_get_response_cleanup
endif
endif
+endif
if USE_POSIX_THREADS
check_PROGRAMS += \