From: Tobias Brunner Date: Thu, 28 Mar 2024 06:46:17 +0000 (+0100) Subject: unit-tests: Adhere to TESTS_NO_IPV6 in HTTP fetcher test suite X-Git-Tag: android-2.5.2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac713746c9dd2ccc4b5ad0372b82806907f5d73c;p=thirdparty%2Fstrongswan.git unit-tests: Adhere to TESTS_NO_IPV6 in HTTP fetcher test suite --- diff --git a/src/libstrongswan/tests/suites/test_fetch_http.c b/src/libstrongswan/tests/suites/test_fetch_http.c index a2a0516f3b..b087a1e791 100644 --- a/src/libstrongswan/tests/suites/test_fetch_http.c +++ b/src/libstrongswan/tests/suites/test_fetch_http.c @@ -309,16 +309,22 @@ Suite *fetch_http_suite_create() { Suite *s; TCase *tc; + int no_ipv6 = 0; s = suite_create("http fetcher"); + if (getenv("TESTS_NO_IPV6")) + { + no_ipv6 = 1; + } + tc = tcase_create("GET"); - tcase_add_loop_test(tc, test_get, 0, countof(gtests)); + tcase_add_loop_test(tc, test_get, 0, countof(gtests) - no_ipv6); test_case_set_timeout(tc, 10); suite_add_tcase(s, tc); tc = tcase_create("POST"); - tcase_add_loop_test(tc, test_post, 0, countof(ptests)); + tcase_add_loop_test(tc, test_post, 0, countof(ptests) - no_ipv6); test_case_set_timeout(tc, 10); suite_add_tcase(s, tc);