#!/bin/sh
# test_process_streams_redirect: replaces the stdout/stderr fds, which
# conflicts with pytest's output capture.
# test_process_preexec_fn_{1,2}, Test_UV_DNS test_getaddrinfo_{8,9}: libuv
# 1.53.0 spawns with posix_spawn(), so preexec_fn never runs, and an empty
# host gives EAI_NODATA.
# test_getaddrinfo_{1,2,3,5,6,11}, Test_AIO_DNS test_getaddrinfo_{8,9}: each
# DNS lookup waits for the resolver timeout without network access.
# --deselect matches a node id prefix, so -k handles 1, 2 and 11.
pytest --automake \
    -k "not (test_getaddrinfo_1 or test_getaddrinfo_2) or test_getaddrinfo_10 or test_getaddrinfo_12 or test_getaddrinfo_13 or test_getaddrinfo_14 or test_getaddrinfo_15 or test_getaddrinfo_16 or test_getaddrinfo_17 or test_getaddrinfo_18 or test_getaddrinfo_19 or test_getaddrinfo_20 or test_getaddrinfo_21 or test_getaddrinfo_22" \
    --deselect=tests/test_process.py::Test_UV_Process::test_process_streams_redirect \
    --deselect=tests/test_process.py::Test_AIO_Process::test_process_streams_redirect \
    --deselect=tests/test_process.py::Test_UV_Process::test_process_preexec_fn_1 \
    --deselect=tests/test_process.py::Test_UV_Process::test_process_preexec_fn_2 \
    --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_3 \
    --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_5 \
    --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_6 \
    --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_8 \
    --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_9 \
    --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_3 \
    --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_5 \
    --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_6 \
    --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_8 \
    --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_9
