Files
utun2/tests/Makefile.am
T

937 lines
42 KiB
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Tests Makefile.am for utun - all tests with new ll_queue library
EXTRA_DIST = fixtures/reality_openssl_hello.hex data/silero_speech.pcm data/silero_speech.txt test_net.h nat_fixture.h \
run_tests.py test_run_tests.py test_build_script.py stream_netns/topology.py stream_netns/network.py \
stream_netns/probe.py stream_netns/run.py stream_netns/scenario.py stream_netns/README.md stream_netns/TESTED.md \
stream_netns/test_isolation.py stream_netns/nat_scenario.py stream_netns/stun_server.py stream_netns/stun_scenario.py
# Порядок по замерам Linux: быстрые проверки раньше длительных; состав зависит от прежних configure-условий.
# Быстрые проверки (до 100мс).
check_PROGRAMS = \
test_route_tx_stats \
test_call_video_rate \
test_call_video_playout \
test_call_video \
test_call_video_flush \
test_memory_pool_and_config \
test_serialize \
test_reed_solomon \
bench_uasync_timeouts \
test_etcp_minimal \
test_sock_match \
test_u_async_performance \
bench_timeout_heap \
test_config_debug \
test_debug_categories \
test_etcp_bbr \
test_packet_dump \
test_radio_vad \
test_media_delivery_sql \
test_etcp_crypto \
test_http_proxy \
test_route_lib \
test_reality_hello \
test_stream_cipher \
test_reality_record \
test_stream_sign \
test_reality_config \
test_socks_client \
test_dm \
test_nat_engine \
test_opus_codec \
test_member_files \
test_attachment \
test_media_index \
test_etcp_lifecycle \
test_etcp_server_lifecycle \
test_reality_bgp \
test_tcp_proxy_client \
test_etcp_session \
test_proxy_packets \
test_media_delivery_download \
test_transport \
test_etcp_router_unit \
test_group_ownership \
test_merkle_protocol \
test_ncd_config \
test_node_snapshot \
test_route6_lib \
test_etcp_transport \
test_stcp_ping \
test_intensive_memory_pool \
test_ll_queue \
test_invite_group_create \
test_nat_transport \
test_conn_mgr_already_connected \
test_udp_proxy \
test_icmp_proxy \
test_chat_poll \
test_pkt_normalizer_standalone \
test_services \
test_etcp_ping \
test_etcp_router_faults \
test_etcp_seq_collision \
test_conn_mgr \
test_ntp \
test_route_ping \
test_tcp_proxy_server \
test_db_sync_schema \
test_member_adapter \
test_chat_feedback \
test_uasync_socket_race \
test_etcp_two_instances \
test_reality_tls \
test_radix \
test_daemon_worker \
test_attachment_send \
test_group_recovery \
test_conn_mgr_handles \
test_tcp_io_flush
if OS_LINUX
check_PROGRAMS += \
test_stun_nat \
test_reality_fallback \
test_etcp_padding \
test_ll_queue_regressions \
test_standby \
test_standby_transport \
test_tun_route
endif
# Короткие интеграционные проверки (до 1с).
check_PROGRAMS += \
test_stream_core \
test_stream_media \
test_stream_playback \
test_stream_tx_stats \
test_android_stream \
test_stream_service \
test_u_async_comprehensive \
test_nat_detection \
test_audio_compressor \
test_etcp_simple_traffic \
test_pkt_normalizer_etcp \
test_broadcast \
test_stcp_traffic \
test_etcp_100_packets \
test_topo_recovery \
test_group_exchange \
test_etcp_router_reconnect \
test_ipv6_sockets \
test_radio_headless \
test_radio_mesh \
test_nat_stress \
test_stcp \
test_call_headless \
test_media_delivery_full \
test_media_download_timeout \
test_etcp_api \
test_tcp_io \
test_lwip_tcp \
test_speex_aec \
test_db_sync \
test_media_delivery_integration \
test_bgp_paths \
test_dm_invite \
test_etcp_link_stress \
test_etcp_router_tcp \
test_proxy_regressions \
test_etcp_connect \
test_call \
test_group_connect \
test_etcp_router \
test_dm_worker \
test_chat_join \
test_radio \
test_bgp_route_exchange \
test_chat_sync_stress \
test_node_conn_direct
if OS_LINUX
check_PROGRAMS += \
test_uasync_regressions \
test_stcp_reality_rotation \
test_android_udp_log \
test_pool_corruption_log \
test_group_connect_standby \
test_android_replies
endif
# Проверки до 3с.
check_PROGRAMS += \
test_u_async_timeouts \
test_async_dns \
test_chat_poll_network \
test_group_avatar \
test_dm_e2e \
test_media_async \
test_bgp_triangle \
test_chat_join_e2e \
test_media_delivery_chat \
test_member_files_network \
test_etcp_reconnect \
test_conn_mgr_phases \
test_socks_http_proxy
# Длительные проверки и нагрузка.
check_PROGRAMS += \
test_bbr_integration \
test_dm_media \
test_merkle_sync
if OS_LINUX
check_PROGRAMS += \
test_uasync_load \
test_auto_socket_dynamic
endif
# ONNX Runtime: без измерений относим дополнительный VAD-тест к длительным.
if HAVE_SILERO_VAD
check_PROGRAMS += test_silero_vad
endif
# Долгие тесты: запускаются только вручную
noinst_PROGRAMS =
EXTRA_PROGRAMS = test_merkle_sync_stress
CLEANFILES = test_merkle_sync_stress$(EXEEXT)
if OS_LINUX
# Отдельный привилегированный стенд не запускается обычным make check.
EXTRA_PROGRAMS += stream_netns/stream_lab_node
stream_netns_stream_lab_node_SOURCES = stream_netns/node.c
stream_netns_stream_lab_node_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
check-stream-netns: stream_netns/stream_lab_node$(EXEEXT)
python3 "$(srcdir)/stream_netns/test_isolation.py"
python3 "$(srcdir)/stream_netns/run.py" --binary "$(abs_builddir)/stream_netns/stream_lab_node$(EXEEXT)" $(STREAM_NETNS_ARGS)
endif
# Разрывы двух узлов и race трёх SQLite-баз; не входит в all/check/check.sh.
.PHONY: check-merkle-sync-stress check-stream-netns
check-merkle-sync-stress: test_merkle_sync_stress$(EXEEXT)
./test_merkle_sync_stress$(EXEEXT)
test_merkle_sync_stress_SOURCES = test_merkle_sync_stress.c
test_merkle_sync_stress_LDADD = $(LIBUTUN) $(COMMON_LIBS)
# Basic includes
AM_CFLAGS = -g
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/lib -I$(srcdir)
LIBUTUN = $(top_builddir)/src/libutun.a
# Windows-specific libraries
if OS_WINDOWS
WIN_LIBS = -lws2_32 -liphlpapi -ladvapi32 -lbcrypt -ldbghelp
else
WIN_LIBS =
endif
# Crypto always uses OpenSSL
CRYPTO_LIBS = -lcrypto
# Common libraries (lib/dns.c собирается с -DDNS_RANDOM=RAND_bytes → нужен -lcrypto)
COMMON_LIBS = $(top_builddir)/lib/libuasync.a $(CRYPTO_LIBS) -lpthread $(WIN_LIBS) @FFMPEG_LIBS@ $(top_builddir)/lib/libopus/libopus_internal.a -lm
test_clock_sources = test_clock.c test_clock.h
if OS_LINUX
test_clock_ldflags = -Wl,--wrap=clock_gettime -Wl,--wrap=gettimeofday -Wl,--wrap=epoll_wait -Wl,--wrap=poll
else
test_clock_ldflags =
endif
# Вариант общего ядра с Android duty-cycle, без JNI и устройства.
if OS_LINUX
test_stcp_LDFLAGS = -Wl,--wrap=send -Wl,--wrap=recv -Wl,--wrap=random_bytes -Wl,--wrap=u_malloc_impl -Wl,--wrap=u_calloc_impl
standby_test_sources = ../tools/chatgui-android/libutun_lite/standby.c ../src/utun_instance.c ../src/transport_layer/etcp_keepalive.c
standby_test_cppflags = $(AM_CPPFLAGS) -I$(top_srcdir)/src/chat -I$(top_srcdir)/tools/chatgui-android/libutun_lite -DUTUN_HAVE_STANDBY
test_standby_SOURCES = ../tools/chatgui-android/libutun_lite/tests/test_standby.c $(standby_test_sources) $(test_clock_sources)
test_standby_CPPFLAGS = $(standby_test_cppflags)
test_standby_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_standby_LDFLAGS = $(test_clock_ldflags)
test_standby_transport_SOURCES = test_standby_transport.c $(standby_test_sources) $(test_clock_sources)
test_standby_transport_CPPFLAGS = $(standby_test_cppflags)
test_standby_transport_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_standby_transport_LDFLAGS = $(test_clock_ldflags) -Wl,--wrap=etcp_encrypt_send -Wl,--wrap=uasync_set_timeout
test_group_connect_standby_SOURCES = test_group_connect.c ../src/routing_layer/topo_group_connect.c $(standby_test_sources) $(test_clock_sources)
test_group_connect_standby_CPPFLAGS = $(standby_test_cppflags)
test_group_connect_standby_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_group_connect_standby_LDFLAGS = $(test_clock_ldflags)
test_android_udp_log_SOURCES = test_android_udp_log.c ../tools/chatgui-android/jni_bridge/android_udp_log.c
test_android_udp_log_LDADD = $(COMMON_LIBS)
test_android_udp_log_LDFLAGS = -Wl,--wrap=uasync_set_timeout -Wl,--wrap=uasync_cancel_timeout
test_android_replies_SOURCES = test_android_replies.c \
../tools/chatgui-android/jni_bridge/android_jni_bridge.c ../tools/chatgui-android/jni_bridge/android_udp_log.c \
../tools/chatgui-android/libutun_lite/instance_lite.c ../tools/chatgui-android/libutun_lite/utun_config_api.c \
../tools/chatgui-android/libutun_lite/attachment_sender.c ../tools/chatgui-android/libutun_lite/photo_sender.c \
../tools/chatgui-android/libutun_lite/video_sender.c ../tools/chatgui-android/libutun_lite/voice_recorder.c \
../tools/chatgui-android/libutun_lite/standby.c ../tools/chatgui-android/libutun_lite/stream_bridge.c
test_android_replies_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/chat -I$(top_srcdir)/src/media_async
test_android_replies_CFLAGS = $(AM_CFLAGS) -ffunction-sections -fdata-sections
test_android_replies_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_android_replies_LDFLAGS = -Wl,--gc-sections -Wl,--wrap=instance_lite_get_instance -Wl,--wrap=instance_lite_get_uasync
test_pool_corruption_log_SOURCES = test_pool_corruption_log.c
test_pool_corruption_log_LDADD = $(COMMON_LIBS)
# Linux/ELF: faults внедряются линкером, тестовых веток в библиотеках нет.
async_regression_sources = async_regression.c async_regression.h
async_regression_ldflags = -Wl,--wrap=u_malloc_impl -Wl,--wrap=u_calloc_impl -Wl,--wrap=u_realloc_impl \
-Wl,--wrap=gettimeofday -Wl,--wrap=epoll_wait -Wl,--wrap=epoll_ctl -Wl,--wrap=eventfd -Wl,--wrap=epoll_create1
test_etcp_padding_SOURCES = test_etcp_padding.c
test_etcp_padding_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_etcp_padding_LDFLAGS = -Wl,--wrap=uasync_set_timeout -Wl,--wrap=socket_sendto
test_uasync_regressions_SOURCES = test_uasync_regressions.c $(async_regression_sources)
test_uasync_regressions_LDADD = $(COMMON_LIBS)
test_uasync_regressions_LDFLAGS = $(async_regression_ldflags)
test_uasync_load_SOURCES = test_uasync_load.c
test_uasync_load_LDADD = $(COMMON_LIBS)
test_uasync_load_LDFLAGS = -Wl,--wrap=clock_gettime -Wl,--wrap=epoll_wait -Wl,--wrap=poll -Wl,--wrap=epoll_create1
test_ll_queue_regressions_SOURCES = test_ll_queue_regressions.c $(async_regression_sources)
test_ll_queue_regressions_LDADD = $(COMMON_LIBS)
test_ll_queue_regressions_LDFLAGS = $(async_regression_ldflags)
endif
# Test definitions
test_etcp_bbr_SOURCES = test_etcp_bbr.c
test_etcp_bbr_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_bbr_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_etcp_crypto_SOURCES = test_etcp_crypto.c
test_etcp_crypto_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_crypto_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_stream_cipher_SOURCES = test_stream_cipher.c
test_stream_cipher_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_stream_cipher_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_stream_sign_SOURCES = test_stream_sign.c
test_stream_sign_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_stream_sign_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_reality_hello_SOURCES = test_reality_hello.c
test_reality_hello_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_reality_hello_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_reality_bgp_SOURCES = test_reality_bgp.c
test_reality_bgp_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/lib
test_reality_bgp_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_reality_config_SOURCES = test_reality_config.c
test_reality_config_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_reality_config_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_dm_SOURCES = test_dm.c
test_attachment_SOURCES = test_attachment.c
test_attachment_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_attachment_send_SOURCES = test_attachment_send.c
test_attachment_send_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_dm_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_dm_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_transport_SOURCES = test_stcp_link.c
test_transport_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_transport_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_transport_SOURCES = test_etcp_stcp.c $(test_clock_sources)
test_etcp_transport_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_transport_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_transport_LDFLAGS = $(test_clock_ldflags)
if OS_LINUX
test_etcp_transport_LDFLAGS += -Wl,--wrap=etcp_encrypt_send
endif
test_stcp_SOURCES = test_stcp.c
test_stcp_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_stcp_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_socks_client_SOURCES = test_socks_client.c $(test_clock_sources)
test_socks_client_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_socks_client_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_socks_client_LDFLAGS = $(test_clock_ldflags)
test_etcp_two_instances_SOURCES = test_etcp_two_instances.c
test_etcp_two_instances_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_two_instances_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_simple_traffic_SOURCES = test_etcp_simple_traffic.c
test_etcp_simple_traffic_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_simple_traffic_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_ipv6_sockets_SOURCES = test_ipv6_sockets.c
test_ipv6_sockets_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_ipv6_sockets_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_tcp_proxy_client_SOURCES = test_tcp_proxy_client.c
test_tcp_proxy_client_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_socks_http_proxy_SOURCES = test_socks_http_proxy.c
test_socks_http_proxy_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_lwip_tcp_SOURCES = test_lwip_tcp.c
test_lwip_tcp_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_lwip_tcp_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_etcp_router_SOURCES = test_etcp_router.c
test_etcp_router_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_router_faults_SOURCES = test_etcp_router_faults.c $(test_clock_sources)
test_etcp_router_faults_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_router_faults_LDFLAGS = $(test_clock_ldflags)
test_etcp_router_unit_SOURCES = test_etcp_router_unit.c
test_etcp_router_unit_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_router_reconnect_SOURCES = test_etcp_router_reconnect.c
test_etcp_router_reconnect_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_tcp_proxy_server_SOURCES = test_tcp_proxy_server.c
test_tcp_proxy_server_CFLAGS = -I$(top_srcdir)/lib
test_tcp_proxy_server_LDADD = $(COMMON_LIBS)
test_udp_proxy_SOURCES = test_udp_proxy.c
test_udp_proxy_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_icmp_proxy_SOURCES = test_icmp_proxy.c
test_icmp_proxy_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_radix_SOURCES = test_radix.c
test_radix_CFLAGS = -I$(top_srcdir)/lib
test_radix_LDADD = $(COMMON_LIBS)
test_route6_lib_SOURCES = test_route6_lib.c
test_route6_lib_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_route6_lib_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_etcp_minimal_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_100_packets_SOURCES = test_etcp_100_packets.c
test_etcp_100_packets_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_100_packets_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_reconnect_SOURCES = test_etcp_reconnect.c
test_etcp_reconnect_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_reconnect_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_seq_collision_SOURCES = test_etcp_seq_collision.c
test_etcp_seq_collision_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_seq_collision_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_pkt_normalizer_etcp_SOURCES = test_pkt_normalizer_etcp.c
test_pkt_normalizer_etcp_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_pkt_normalizer_etcp_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_pkt_normalizer_standalone_SOURCES = test_pkt_normalizer_standalone.c
test_pkt_normalizer_standalone_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_pkt_normalizer_standalone_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_api_SOURCES = test_etcp_api.c
test_etcp_api_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_api_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_ping_SOURCES = test_etcp_ping.c
test_etcp_ping_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_ping_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_stcp_ping_SOURCES = test_stcp_ping.c
test_stcp_ping_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_stcp_ping_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_route_ping_SOURCES = test_route_ping.c
test_route_ping_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_route_ping_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_nat_detection_SOURCES = test_nat_detection.c
test_nat_detection_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_nat_detection_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
if OS_LINUX
check_PROGRAMS += test_nat_detection_faults
test_nat_detection_faults_SOURCES = test_nat_detection_faults.c $(test_clock_sources)
test_nat_detection_faults_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_nat_detection_faults_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_nat_detection_faults_LDFLAGS = $(test_clock_ldflags) -Wl,--wrap=socket_sendto \
-Wl,--wrap=nat_detection_record_observation -Wl,--wrap=nat_detection_receive_ingress -Wl,--wrap=etcp_route_send
endif
test_stun_nat_SOURCES = test_stun_nat.c $(test_clock_sources)
test_stun_nat_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_stun_nat_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_stun_nat_LDFLAGS = $(test_clock_ldflags)
test_nat_engine_SOURCES = test_nat_engine.c
test_nat_engine_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_nat_engine_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_nat_transport_SOURCES = test_nat_transport.c
test_nat_transport_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_nat_transport_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_nat_stress_SOURCES = test_nat_stress.c
test_nat_stress_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_nat_stress_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_ll_queue_SOURCES = test_ll_queue.c
test_ll_queue_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_ll_queue_LDADD = $(COMMON_LIBS)
test_serialize_SOURCES = test_serialize.c
test_serialize_CFLAGS = -I$(top_srcdir)/lib
test_serialize_LDADD = $(COMMON_LIBS)
test_reed_solomon_SOURCES = test_reed_solomon.c
test_reed_solomon_CFLAGS = -I$(top_srcdir)/lib
test_reed_solomon_LDADD = $(COMMON_LIBS)
test_stream_core_SOURCES = test_stream_core.c $(test_clock_sources)
test_stream_core_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_stream_core_LDFLAGS = $(test_clock_ldflags)
test_stream_media_SOURCES = test_stream_media.c
test_stream_media_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_stream_playback_SOURCES = test_stream_playback.c
test_stream_playback_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_stream_tx_stats_SOURCES = test_stream_tx_stats.c
test_stream_tx_stats_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_android_stream_SOURCES = test_android_stream.c $(test_clock_sources) ../tools/chatgui-android/libutun_lite/stream_bridge.c
test_android_stream_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_android_stream_LDFLAGS = $(test_clock_ldflags)
test_stream_service_SOURCES = test_stream_service.c $(test_clock_sources)
test_stream_service_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_stream_service_LDFLAGS = $(test_clock_ldflags) -Wl,--wrap=uasync_get_load
test_intensive_memory_pool_SOURCES = test_intensive_memory_pool.c
test_intensive_memory_pool_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_intensive_memory_pool_LDADD = $(COMMON_LIBS)
test_tcp_io_SOURCES = test_tcp_io.c
test_tcp_io_CFLAGS = -I$(top_srcdir)/lib
test_tcp_io_LDADD = $(COMMON_LIBS)
test_uasync_socket_race_SOURCES = test_uasync_socket_race.c
test_uasync_socket_race_CFLAGS = -I$(top_srcdir)/lib
test_uasync_socket_race_LDADD = $(COMMON_LIBS)
test_ntp_SOURCES = test_ntp.c
test_ntp_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_ntp_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_async_dns_SOURCES = test_async_dns.c
test_async_dns_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_async_dns_LDADD = $(COMMON_LIBS)
test_memory_pool_and_config_SOURCES = test_memory_pool_and_config.c
test_memory_pool_and_config_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_memory_pool_and_config_LDADD = $(COMMON_LIBS)
test_packet_dump_SOURCES = test_packet_dump.c
test_packet_dump_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_packet_dump_LDADD = $(COMMON_LIBS)
test_u_async_comprehensive_SOURCES = test_u_async_comprehensive.c
test_u_async_comprehensive_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_u_async_comprehensive_LDADD = $(COMMON_LIBS)
test_u_async_performance_SOURCES = test_u_async_performance.c
test_u_async_performance_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_u_async_performance_LDADD = $(COMMON_LIBS)
test_u_async_timeouts_SOURCES = test_u_async_timeouts.c
test_u_async_timeouts_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_u_async_timeouts_LDADD = $(COMMON_LIBS)
test_debug_categories_SOURCES = test_debug_categories.c
test_debug_categories_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_debug_categories_LDADD = $(COMMON_LIBS)
test_config_debug_SOURCES = test_config_debug.c
test_config_debug_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_config_debug_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_route_lib_SOURCES = test_route_lib.c
test_route_lib_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_route_lib_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_bgp_route_exchange_SOURCES = test_bgp_route_exchange.c test_connection_loss.h $(test_clock_sources)
test_bgp_route_exchange_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_bgp_route_exchange_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_bgp_route_exchange_LDFLAGS = $(test_clock_ldflags)
test_bgp_triangle_SOURCES = test_bgp_triangle.c test_connection_loss.h $(test_clock_sources)
test_bgp_triangle_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_bgp_triangle_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_bgp_triangle_LDFLAGS = $(test_clock_ldflags)
test_broadcast_SOURCES = test_broadcast.c
test_broadcast_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_broadcast_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_conn_mgr_SOURCES = test_conn_mgr.c
test_conn_mgr_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_conn_mgr_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_conn_mgr_phases_SOURCES = test_conn_mgr_phases.c $(test_clock_sources)
test_conn_mgr_phases_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_conn_mgr_phases_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_conn_mgr_phases_LDFLAGS = $(test_clock_ldflags)
test_conn_mgr_handles_SOURCES = test_conn_mgr_handles.c
test_conn_mgr_handles_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_conn_mgr_handles_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_conn_mgr_already_connected_SOURCES = test_conn_mgr_already_connected.c
test_conn_mgr_already_connected_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_conn_mgr_already_connected_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_sock_match_SOURCES = test_sock_match.c
test_sock_match_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/lib
test_sock_match_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_invite_group_create_SOURCES = test_invite_group_create.c
test_invite_group_create_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_invite_group_create_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_connect_SOURCES = test_etcp_connect.c
test_etcp_connect_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_connect_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_node_conn_direct_SOURCES = test_node_conn_direct.c
test_node_conn_direct_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_node_conn_direct_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_group_ownership_SOURCES = test_group_ownership.c
test_group_ownership_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_group_ownership_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_group_exchange_SOURCES = test_group_exchange.c
test_group_exchange_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_group_exchange_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_bgp_paths_SOURCES = test_bgp_paths.c
test_bgp_paths_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_bgp_paths_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_group_recovery_SOURCES = test_group_recovery.c $(test_clock_sources)
test_group_recovery_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_group_recovery_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_group_recovery_LDFLAGS = $(test_clock_ldflags)
test_group_connect_SOURCES = test_group_connect.c $(test_clock_sources)
test_group_connect_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_group_connect_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_group_connect_LDFLAGS = $(test_clock_ldflags)
test_node_snapshot_SOURCES = test_node_snapshot.c
test_node_snapshot_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_node_snapshot_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_ncd_config_SOURCES = test_ncd_config.c
test_ncd_config_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_ncd_config_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_db_sync_SOURCES = test_db_sync.c
test_db_sync_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_db_sync_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_db_sync_schema_SOURCES = test_db_sync_schema.c
test_db_sync_schema_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_db_sync_schema_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_merkle_sync_SOURCES = test_merkle_sync.c $(test_clock_sources)
test_chat_feedback_SOURCES = test_chat_feedback.c
test_chat_feedback_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/lib
test_chat_feedback_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_merkle_protocol_SOURCES = test_merkle_protocol.c
test_merkle_protocol_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/lib
test_merkle_protocol_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_member_adapter_SOURCES = test_member_adapter.c
test_member_adapter_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/lib
test_member_adapter_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_merkle_sync_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/lib
test_merkle_sync_LDFLAGS = $(test_clock_ldflags)
test_merkle_sync_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_chat_sync_stress_SOURCES = test_chat_sync_stress.c
test_chat_sync_stress_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_chat_sync_stress_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_chat_join_SOURCES = test_chat_join.c $(test_clock_sources)
test_chat_join_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_chat_join_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_chat_join_LDFLAGS = $(test_clock_ldflags)
test_chat_join_e2e_SOURCES = test_chat_join_e2e.c
test_chat_join_e2e_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_chat_join_e2e_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_dm_e2e_SOURCES = test_dm_e2e.c $(test_clock_sources)
test_dm_e2e_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/src/dm -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_dm_e2e_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_dm_e2e_LDFLAGS = $(test_clock_ldflags)
test_dm_invite_SOURCES = test_dm_invite.c $(test_clock_sources)
test_dm_invite_CFLAGS = $(test_dm_e2e_CFLAGS)
test_dm_invite_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_dm_invite_LDFLAGS = $(test_clock_ldflags)
test_dm_media_SOURCES = test_dm_media.c $(test_clock_sources)
test_dm_media_CFLAGS = $(test_dm_e2e_CFLAGS)
test_dm_media_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_dm_media_LDFLAGS = $(test_clock_ldflags)
test_dm_worker_SOURCES = test_dm_worker.c
test_dm_worker_CFLAGS = $(test_dm_e2e_CFLAGS)
test_dm_worker_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_call_SOURCES = test_call.c
test_route_tx_stats_SOURCES = test_route_tx_stats.c
test_route_tx_stats_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_call_video_rate_SOURCES = test_call_video_rate.c
test_call_video_rate_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_call_video_playout_SOURCES = test_call_video_playout.c
test_call_video_playout_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_call_video_SOURCES = test_call_video.c
test_call_video_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_call_video_flush_SOURCES = test_call_video_flush.c
test_call_video_flush_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_call_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/src/dm -I$(top_srcdir)/src/call -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_call_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_call_headless_SOURCES = test_call_headless.c
test_call_headless_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/src/dm -I$(top_srcdir)/src/call -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_call_headless_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_radio_SOURCES = test_radio.c $(test_clock_sources)
test_radio_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/src/dm -I$(top_srcdir)/src/call -I$(top_srcdir)/src/radio -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_radio_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_radio_LDFLAGS = $(test_clock_ldflags)
test_radio_headless_SOURCES = test_radio_headless.c
test_radio_headless_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/src/dm -I$(top_srcdir)/src/call -I$(top_srcdir)/src/radio -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_radio_headless_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_radio_mesh_SOURCES = test_radio_mesh.c
test_radio_mesh_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/src/dm -I$(top_srcdir)/src/call -I$(top_srcdir)/src/radio -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_radio_mesh_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_stcp_traffic_SOURCES = test_stcp_traffic.c
test_stcp_traffic_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_stcp_traffic_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_bbr_integration_SOURCES = bbr_integration/test_bbr_integration.c
test_bbr_integration_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_bbr_integration_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
bench_timeout_heap_SOURCES = bench_timeout_heap.c
bench_timeout_heap_CFLAGS = -I$(top_srcdir)/lib
bench_timeout_heap_LDADD = $(COMMON_LIBS)
bench_uasync_timeouts_SOURCES = bench_uasync_timeouts.c
bench_uasync_timeouts_CFLAGS = -I$(top_srcdir)/lib
bench_uasync_timeouts_LDADD = $(COMMON_LIBS)
test_opus_codec_SOURCES = test_opus_codec.c
test_opus_codec_CFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/lib/libopus/include
test_opus_codec_LDADD = $(COMMON_LIBS) $(top_builddir)/lib/libopus/libopus_internal.a -lm
test_audio_compressor_SOURCES = test_audio_compressor.c
test_audio_compressor_LDADD = $(COMMON_LIBS) -lm
test_radio_vad_SOURCES = test_radio_vad.c
test_radio_vad_LDADD = -lm
test_silero_vad_SOURCES = test_silero_vad.c
test_silero_vad_CFLAGS = -I$(top_srcdir)/lib -DTEST_SILERO_SPEECH_PATH='"$(srcdir)/data/silero_speech.pcm"'
test_silero_vad_LDADD = $(COMMON_LIBS) @SILERO_VAD_LIBS@
test_speex_aec_SOURCES = test_speex_aec.c
test_speex_aec_CFLAGS = -I$(top_srcdir)/lib
test_speex_aec_LDADD = $(COMMON_LIBS)
test_media_async_SOURCES = test_media_async.c
test_media_async_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/media_async -I$(top_srcdir)/lib
test_media_async_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_media_index_SOURCES = test_media_index.c
test_media_index_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/media_delivery -I$(top_srcdir)/src/media_async -I$(top_srcdir)/lib
test_media_index_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_media_delivery_sql_SOURCES = test_media_delivery_sql.c
test_media_delivery_sql_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/media_delivery -I$(top_srcdir)/lib
test_media_delivery_sql_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_media_delivery_download_SOURCES = test_media_delivery_download.c
test_media_delivery_download_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/media_delivery -I$(top_srcdir)/src/media_async -I$(top_srcdir)/lib -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/chat
test_media_delivery_download_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_media_download_timeout_SOURCES = test_media_download_timeout.c
test_media_download_timeout_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/media_delivery -I$(top_srcdir)/src/media_async -I$(top_srcdir)/lib -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/chat
test_media_download_timeout_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_media_delivery_integration_SOURCES = test_media_delivery_integration.c
test_media_delivery_integration_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/media_delivery -I$(top_srcdir)/src/media_async -I$(top_srcdir)/lib -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/chat
test_media_delivery_integration_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_link_stress_SOURCES = test_etcp_link_stress.c
test_etcp_link_stress_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
test_etcp_link_stress_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_auto_socket_dynamic_SOURCES = test_auto_socket_dynamic.c $(test_clock_sources)
test_auto_socket_dynamic_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/lib
test_auto_socket_dynamic_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_auto_socket_dynamic_LDFLAGS = $(test_clock_ldflags)
test_media_delivery_full_SOURCES = test_media_delivery_full.c
test_media_delivery_full_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/media_delivery -I$(top_srcdir)/src/media_async -I$(top_srcdir)/lib -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/chat
test_media_delivery_full_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_media_delivery_chat_SOURCES = test_media_delivery_chat.c
test_media_delivery_chat_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/media_delivery -I$(top_srcdir)/src/media_async -I$(top_srcdir)/lib -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/chat
test_media_delivery_chat_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
# Copy test configs to build directory (tests run from build/tests/)
all-local: copy-test-configs
copy-test-configs: $(check_PROGRAMS)
@if test "$(abs_srcdir)" != "$(abs_builddir)"; then \
for conf in $(srcdir)/test_*.conf $(srcdir)/test_*.json; do \
if test -f "$$conf"; then \
cp -f "$$conf" "$(abs_builddir)/" || { echo "ERROR: cannot copy $$conf" >&2; exit 1; }; \
fi; \
done; \
fi
# Clean
clean-local:
-rm -f $(check_PROGRAMS)
@if test "$(abs_srcdir)" != "$(abs_builddir)"; then rm -f "$(abs_builddir)"/test_*.conf "$(abs_builddir)"/test_*.json; fi
-rm -rf $(top_builddir)/tests/logs 2>/dev/null || true
# Test logs directory
TEST_LOG_DIR = $(top_builddir)/tests/logs
# По умолчанию jobs = доступные CPU; TEST_JOBS=1 сохраняет последовательный запуск.
check-local: check-runner $(check_PROGRAMS)
@python3 "$(srcdir)/run_tests.py" --log-dir "$(TEST_LOG_DIR)" $(check_PROGRAMS)
.PHONY: check-runner
check-runner:
@python3 "$(srcdir)/test_run_tests.py"
@echo "[INFO] test runner regression checks passed"
.PHONY: check-build-script
check-build-script:
@if command -v python3 >/dev/null 2>&1; then \
python3 "$(srcdir)/test_build_script.py" "$(top_srcdir)/build.sh"; \
else echo "[SKIP] build.sh regression checks require python3"; fi
# Интеграционный тест tcp_proxy_full (требует sudo, TUN, iptables). Запускается из check.sh.
.PHONY: check-proxy
check-proxy:
@cd $(srcdir)/tcp_proxy_full && bash run_test.sh
# Burst-тест tcp_proxy: двусторонний byte-exact трафик со случайными idle (требует sudo).
.PHONY: check-burst
check-burst:
@cd $(srcdir)/tcp_proxy_full && bash run_burst_test.sh
# Нагрузочный тест tcp_proxy: N параллельных соединений, byte-exact, замер пропускной (требует sudo).
.PHONY: check-load
check-load:
@cd $(srcdir)/tcp_proxy_full && bash run_load_test.sh
test_etcp_lifecycle_SOURCES = test_etcp_lifecycle.c
test_etcp_lifecycle_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_server_lifecycle_SOURCES = test_etcp_server_lifecycle.c $(test_clock_sources)
test_etcp_server_lifecycle_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_etcp_server_lifecycle_LDFLAGS = $(test_clock_ldflags)
test_topo_recovery_SOURCES = test_topo_recovery.c
test_topo_recovery_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_etcp_session_SOURCES = test_etcp_session.c $(test_clock_sources)
test_etcp_session_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_etcp_session_LDFLAGS = $(test_clock_ldflags)
test_etcp_router_tcp_SOURCES = test_etcp_router_tcp.c
test_etcp_router_tcp_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_services_SOURCES = test_services.c
test_services_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/routing_layer -I$(top_srcdir)/src/transport_layer -I$(top_srcdir)/lib
test_services_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_tun_route_SOURCES = test_tun_route.c
test_tun_route_LDADD = $(LIBUTUN) $(COMMON_LIBS)
test_tun_route_LDFLAGS = -Wl,--wrap=sendto -Wl,--wrap=recvfrom -Wl,--wrap=poll -Wl,--wrap=tun_platform_init \
-Wl,--wrap=socket -Wl,--wrap=bind
test_member_files_SOURCES = test_member_files.c
test_member_files_CFLAGS = $(test_services_CFLAGS)
test_member_files_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_member_files_network_SOURCES = test_member_files_network.c $(test_clock_sources)
test_member_files_network_CFLAGS = $(test_services_CFLAGS)
test_member_files_network_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_member_files_network_LDFLAGS = $(test_clock_ldflags)
test_group_avatar_SOURCES = test_group_avatar.c
test_group_avatar_CFLAGS = $(test_services_CFLAGS)
test_group_avatar_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_daemon_worker_SOURCES = test_daemon_worker.c
test_daemon_worker_CFLAGS = $(test_services_CFLAGS) -DUTUN_CLI_PATH='"$(abs_top_builddir)/src/utun"'
test_daemon_worker_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_daemon_worker_DEPENDENCIES = $(LIBUTUN) $(top_builddir)/src/utun
$(top_builddir)/src/utun:
$(MAKE) -C $(top_builddir)/src utun
# Граничные длины и checksum UDP/ICMP после восстановления пакета.
test_proxy_packets_SOURCES = test_proxy_packets.c
test_proxy_packets_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
# Управляемый транспорт для граничных состояний proxy.
test_proxy_regressions_SOURCES = test_proxy_regressions.c $(test_clock_sources)
test_proxy_regressions_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_proxy_regressions_LDFLAGS = $(test_clock_ldflags) -Wl,--wrap=etcp_route_send -Wl,--wrap=uasync_set_timeout
test_http_proxy_SOURCES = test_http_proxy.c ../src/proxy/http_proxy.c
test_http_proxy_LDADD = $(COMMON_LIBS)
test_tcp_io_flush_SOURCES = test_tcp_io_flush.c
test_tcp_io_flush_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_chat_poll_SOURCES = test_chat_poll.c
test_chat_poll_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/lib
test_chat_poll_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_chat_poll_network_SOURCES = test_chat_poll_network.c
test_chat_poll_network_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/lib
test_chat_poll_network_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
test_reality_record_SOURCES = test_reality_record.c
test_reality_record_LDADD = $(LIBUTUN) $(COMMON_LIBS)
if OS_LINUX
# Низкий лимит проверяет реальную смену ключей в обе стороны без миллиона пакетов.
test_stcp_reality_rotation_SOURCES = test_stcp.c ../src/transport_layer/reality_io.c ../src/transport_layer/reality_record.c
test_stcp_reality_rotation_CFLAGS = $(AM_CFLAGS) -DREALITY_KEY_LIMIT=8
test_stcp_reality_rotation_LDFLAGS = -Wl,--wrap=send -Wl,--wrap=recv -Wl,--wrap=random_bytes -Wl,--wrap=u_malloc_impl -Wl,--wrap=u_calloc_impl
test_stcp_reality_rotation_LDADD = $(LIBUTUN) $(COMMON_LIBS)
endif
if OS_LINUX
test_reality_fallback_SOURCES = test_reality_fallback.c
test_reality_fallback_LDFLAGS = -Wl,--wrap=ntp_time_get_seconds
test_reality_fallback_LDADD = $(LIBUTUN) $(COMMON_LIBS)
endif
test_reality_tls_SOURCES = test_reality_tls.c
test_reality_tls_LDADD = $(LIBUTUN) -lssl $(COMMON_LIBS)