aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-10-30 18:56:09 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-10-30 19:28:22 +0300
commita64f771aeb92241e9d09824df8d423c699bfa1c3 (patch)
tree96cb2661922a6443980f7a44decd5d04ad6ef393
parent553f3e5de457f6eae5c1785e959339f6eb944994 (diff)
downloadlibmicrohttpd-a64f771aeb92241e9d09824df8d423c699bfa1c3.tar.gz
libmicrohttpd-a64f771aeb92241e9d09824df8d423c699bfa1c3.zip
test-suite: marked some tests as "very heavy" tests
-rw-r--r--configure.ac46
-rw-r--r--src/testzzuf/socat.c6
2 files changed, 39 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 3ad191ec..fbbcdfc9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1510,23 +1510,49 @@ test "x$enable_examples" = "xno" || enable_examples=yes
1510AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" = "xyes"]) 1510AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" = "xyes"])
1511 1511
1512AC_ARG_ENABLE([[heavy-tests]], 1512AC_ARG_ENABLE([[heavy-tests]],
1513 [AS_HELP_STRING([[--enable-heavy-tests]], [use heavy tests in test-suite. WARNING:] 1513 [AS_HELP_STRING([[--enable-heavy-tests[=SCOPE]]], [use SCOPE of heavy tests in test-suite. WARNING:]
1514 [a dedicated host with minimal number of background processes and no network] 1514 [a dedicated host with minimal number of background processes and no network]
1515 [activity is recommended to enable.])], [], 1515 [activity is recommended to enable. (basic, full)])], [],
1516 [enable_heavy_tests=no]) 1516 [enable_heavy_tests=no])
1517AS_VAR_IF([enable_heavy_tests], ["yes"], 1517use_heavy_tests="no"
1518use_vheavy_tests="no"
1519use_heavy_tests_MSG="no"
1520AS_CASE([${enable_heavy_tests}],
1521 [yes|basic],
1522 [
1523 enable_heavy_tests="basic"
1524 use_heavy_tests="yes"
1525 use_vheavy_tests="no"
1526 use_heavy_tests_MSG="yes, basic heavy tests (a dedicated host is recommended)"
1527 ],
1528 [all|full],
1529 [
1530 enable_heavy_tests="full"
1531 use_heavy_tests="yes"
1532 use_vheavy_tests="yes"
1533 use_heavy_tests_MSG="yes, full set of heavy tests (a dedicated host is recommended)"
1534 ],
1535 [no],
1536 [
1537 use_heavy_tests="no"
1538 use_vheavy_tests="no"
1539 use_heavy_tests_MSG="no"
1540 ],
1541 [AC_MSG_ERROR([[Unknown parameter value: --enable-heavy-tests=${enable_heavy_tests}]])]
1542)
1543AS_VAR_IF([use_heavy_tests], ["yes"],
1518 [ 1544 [
1519 HEAVY_TESTS_NOTPARALLEL='.NOTPARALLEL:' 1545 HEAVY_TESTS_NOTPARALLEL='.NOTPARALLEL:'
1520 AC_DEFINE([_MHD_HEAVY_TESTS], [1], [Define to 1 to enable "heavy" test paths.]) 1546 AC_DEFINE([_MHD_HEAVY_TESTS], [1], [Define to 1 to enable "heavy" test paths.])
1521 heavy_tests_MSG="yes (dedicated host is recommended)" 1547 AS_VAR_IF([use_vheavy_tests], ["yes"],
1548 [AC_DEFINE([_MHD_VHEAVY_TESTS], [1], [Define to 1 to enable "very heavy" test paths.])]
1549 )
1522 ], 1550 ],
1523 [ 1551 [
1524 enable_heavy_tests=no
1525 HEAVY_TESTS_NOTPARALLEL=" " 1552 HEAVY_TESTS_NOTPARALLEL=" "
1526 heavy_tests_MSG="no"
1527 ] 1553 ]
1528) 1554)
1529AM_CONDITIONAL([HEAVY_TESTS],[test "x$enable_heavy_tests" = "xyes"]) 1555AM_CONDITIONAL([HEAVY_TESTS],[test "x$use_heavy_tests" = "xyes"])
1530 1556
1531AC_ARG_ENABLE([[poll]], 1557AC_ARG_ENABLE([[poll]],
1532 [AS_HELP_STRING([[--enable-poll[=ARG]]], [enable poll support (yes, no, auto) [auto]])], 1558 [AS_HELP_STRING([[--enable-poll[=ARG]]], [enable poll support (yes, no, auto) [auto]])],
@@ -2665,7 +2691,7 @@ AC_MSG_RESULT([[$enable_postprocessor]])
2665 2691
2666# optional: have zzuf, socat? 2692# optional: have zzuf, socat?
2667run_zzuf_tests="no" 2693run_zzuf_tests="no"
2668AS_VAR_IF([enable_heavy_tests],["yes"], 2694AS_VAR_IF([use_heavy_tests],["yes"],
2669 [ 2695 [
2670 AS_VAR_IF([enable_curl],["yes"], 2696 AS_VAR_IF([enable_curl],["yes"],
2671 [ 2697 [
@@ -3600,7 +3626,7 @@ AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
3600 3626
3601AX_COUNT_CPUS 3627AX_COUNT_CPUS
3602AC_MSG_CHECKING([for number of CPU cores to use in tests]) 3628AC_MSG_CHECKING([for number of CPU cores to use in tests])
3603AS_VAR_IF([enable_heavy_tests], ["yes"], 3629AS_VAR_IF([use_heavy_tests], ["yes"],
3604 [ 3630 [
3605 # Enable usage of many core if heavy tests are enabled 3631 # Enable usage of many core if heavy tests are enabled
3606 AS_IF([[test "$CPU_COUNT" -gt "32"]], [[CPU_COUNT="32"]])dnl Limit resource usage 3632 AS_IF([[test "$CPU_COUNT" -gt "32"]], [[CPU_COUNT="32"]])dnl Limit resource usage
@@ -4321,7 +4347,7 @@ AC_MSG_NOTICE([GNU libmicrohttpd ${PACKAGE_VERSION} Configuration Summary:
4321 Build static lib: ${enable_static} 4347 Build static lib: ${enable_static}
4322 Build shared lib: ${enable_shared} 4348 Build shared lib: ${enable_shared}
4323 Test with libcurl: ${MSG_CURL} 4349 Test with libcurl: ${MSG_CURL}
4324 Heavy tests: ${heavy_tests_MSG} 4350 Heavy tests: ${use_heavy_tests_MSG}
4325 Fuzzing tests: ${run_zzuf_tests_MSG=no} 4351 Fuzzing tests: ${run_zzuf_tests_MSG=no}
4326]) 4352])
4327 4353
diff --git a/src/testzzuf/socat.c b/src/testzzuf/socat.c
index 85423aad..0ee14749 100644
--- a/src/testzzuf/socat.c
+++ b/src/testzzuf/socat.c
@@ -43,11 +43,11 @@
43 * long for most user's patience. So this small 43 * long for most user's patience. So this small
44 * value is the default. 44 * value is the default.
45 */ 45 */
46#ifndef _MHD_HEAVY_TESTS 46#ifndef _MHD_VHEAVY_TESTS
47#define LOOP_COUNT 10 47#define LOOP_COUNT 10
48#else /* ! _MHD_HEAVY_TESTS */ 48#else /* ! _MHD_VHEAVY_TESTS */
49#define LOOP_COUNT 200 49#define LOOP_COUNT 200
50#endif /* ! _MHD_HEAVY_TESTS */ 50#endif /* ! _MHD_VHEAVY_TESTS */
51 51
52#define CURL_TIMEOUT 50L 52#define CURL_TIMEOUT 50L
53 53