unit-tests: Add environment variable to skip IPv6 stream tests

This is an issue e.g. when running tests in default Docker containers.
This commit is contained in:
Tobias Brunner
2022-04-14 19:05:45 +02:00
parent 7d99b29b99
commit 76ff49b761
+10 -4
View File
@@ -245,23 +245,29 @@ Suite *stream_suite_create()
{
Suite *s;
TCase *tc;
int count = countof(services);
if (getenv("TESTS_NO_IPV6"))
{
count--;
}
s = suite_create("stream");
tc = tcase_create("sync");
tcase_add_loop_test(tc, test_sync, 0, countof(services));
tcase_add_loop_test(tc, test_sync, 0, count);
suite_add_tcase(s, tc);
tc = tcase_create("async");
tcase_add_loop_test(tc, test_async, 0, countof(services));
tcase_add_loop_test(tc, test_async, 0, count);
suite_add_tcase(s, tc);
tc = tcase_create("all");
tcase_add_loop_test(tc, test_all, 0, countof(services));
tcase_add_loop_test(tc, test_all, 0, count);
suite_add_tcase(s, tc);
tc = tcase_create("concurrency");
tcase_add_loop_test(tc, test_concurrency, 0, countof(services));
tcase_add_loop_test(tc, test_concurrency, 0, count);
suite_add_tcase(s, tc);
return s;