2013-08-14 02:55:32 +08:00
|
|
|
if BUILD_TESTS
|
|
|
|
|
2022-01-26 03:25:36 +08:00
|
|
|
noinst_LTLIBRARIES += libauto_test_support.la
|
|
|
|
libauto_test_support_la_SOURCES = ../auto_tests/auto_test_support.c ../auto_tests/auto_test_support.h
|
|
|
|
libauto_test_support_la_LIBADD = libmisc_tools.la libtoxcore.la
|
|
|
|
|
2018-08-26 06:50:26 +08:00
|
|
|
TESTS = \
|
2023-12-25 08:28:36 +08:00
|
|
|
announce_test \
|
2018-08-26 06:50:26 +08:00
|
|
|
conference_double_invite_test \
|
2020-03-01 08:00:00 +08:00
|
|
|
conference_invite_merge_test \
|
2018-08-26 06:50:26 +08:00
|
|
|
conference_peer_nick_test \
|
|
|
|
conference_simple_test \
|
|
|
|
conference_test \
|
|
|
|
conference_two_test \
|
|
|
|
crypto_test \
|
2023-12-25 08:28:36 +08:00
|
|
|
encryptsave_test \
|
|
|
|
file_saving_test \
|
2024-01-15 06:14:14 +08:00
|
|
|
file_streaming_test \
|
2018-08-26 06:50:26 +08:00
|
|
|
file_transfer_test \
|
2020-12-31 08:00:00 +08:00
|
|
|
forwarding_test \
|
2018-08-26 06:50:26 +08:00
|
|
|
friend_connection_test \
|
|
|
|
friend_request_test \
|
2022-09-22 21:36:19 +08:00
|
|
|
group_state_test \
|
2018-08-26 06:50:26 +08:00
|
|
|
invalid_tcp_proxy_test \
|
|
|
|
invalid_udp_proxy_test \
|
|
|
|
lan_discovery_test \
|
|
|
|
lossless_packet_test \
|
|
|
|
lossy_packet_test \
|
|
|
|
network_test \
|
|
|
|
onion_test \
|
|
|
|
overflow_recvq_test \
|
|
|
|
overflow_sendq_test \
|
2018-08-15 00:37:32 +08:00
|
|
|
reconnect_test \
|
2018-08-26 06:50:26 +08:00
|
|
|
save_compatibility_test \
|
|
|
|
save_friend_test \
|
|
|
|
send_message_test \
|
|
|
|
set_name_test \
|
|
|
|
set_status_message_test \
|
|
|
|
TCP_test \
|
2022-02-07 07:53:41 +08:00
|
|
|
tox_dispatch_test \
|
2023-12-25 08:28:36 +08:00
|
|
|
tox_events_test \
|
2018-08-26 06:50:26 +08:00
|
|
|
tox_many_tcp_test \
|
|
|
|
tox_many_test \
|
|
|
|
tox_strncasecmp_test \
|
|
|
|
typing_test \
|
|
|
|
version_test
|
2014-04-05 23:09:44 +08:00
|
|
|
|
2013-11-07 03:32:02 +08:00
|
|
|
AUTOTEST_CFLAGS = \
|
2023-12-25 08:28:36 +08:00
|
|
|
$(LIBSODIUM_CFLAGS)
|
2014-07-27 21:51:45 +08:00
|
|
|
|
2013-11-07 03:32:02 +08:00
|
|
|
AUTOTEST_LDADD = \
|
2018-08-26 06:50:26 +08:00
|
|
|
$(LIBSODIUM_LDFLAGS) \
|
|
|
|
libmisc_tools.la \
|
2022-01-26 03:25:36 +08:00
|
|
|
libauto_test_support.la \
|
2018-08-26 06:50:26 +08:00
|
|
|
libtoxcore.la \
|
|
|
|
libtoxencryptsave.la \
|
2023-12-25 08:28:36 +08:00
|
|
|
$(LIBSODIUM_LIBS)
|
2014-04-05 23:09:44 +08:00
|
|
|
|
2014-05-24 22:02:01 +08:00
|
|
|
|
2014-04-05 23:09:44 +08:00
|
|
|
if BUILD_AV
|
2019-02-10 08:00:00 +08:00
|
|
|
TESTS += conference_av_test toxav_basic_test toxav_many_test
|
2014-05-24 22:02:01 +08:00
|
|
|
AUTOTEST_LDADD += libtoxav.la
|
2014-04-05 23:09:44 +08:00
|
|
|
endif
|
|
|
|
|
2018-08-26 06:50:26 +08:00
|
|
|
check_PROGRAMS = $(TESTS)
|
|
|
|
|
2020-12-31 08:00:00 +08:00
|
|
|
announce_test_SOURCES = ../auto_tests/announce_test.c
|
|
|
|
announce_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
|
|
|
announce_test_LDADD = $(AUTOTEST_LDADD)
|
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
conference_double_invite_test_SOURCES = ../auto_tests/conference_double_invite_test.c
|
|
|
|
conference_double_invite_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
conference_double_invite_test_LDADD = $(AUTOTEST_LDADD)
|
2013-11-07 03:32:02 +08:00
|
|
|
|
2020-03-01 08:00:00 +08:00
|
|
|
conference_invite_merge_test_SOURCES = ../auto_tests/conference_invite_merge_test.c
|
|
|
|
conference_invite_merge_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
|
|
|
conference_invite_merge_test_LDADD = $(AUTOTEST_LDADD)
|
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
conference_peer_nick_test_SOURCES = ../auto_tests/conference_peer_nick_test.c
|
|
|
|
conference_peer_nick_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
conference_peer_nick_test_LDADD = $(AUTOTEST_LDADD)
|
2013-11-07 03:32:02 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
conference_simple_test_SOURCES = ../auto_tests/conference_simple_test.c
|
|
|
|
conference_simple_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
conference_simple_test_LDADD = $(AUTOTEST_LDADD)
|
2013-08-14 02:55:32 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
conference_test_SOURCES = ../auto_tests/conference_test.c
|
|
|
|
conference_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
conference_test_LDADD = $(AUTOTEST_LDADD)
|
2013-08-14 02:55:32 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
conference_two_test_SOURCES = ../auto_tests/conference_two_test.c
|
|
|
|
conference_two_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
conference_two_test_LDADD = $(AUTOTEST_LDADD)
|
2013-08-14 02:55:32 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
crypto_test_SOURCES = ../auto_tests/crypto_test.c
|
|
|
|
crypto_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2014-05-11 00:00:49 +08:00
|
|
|
crypto_test_LDADD = $(AUTOTEST_LDADD)
|
2013-08-14 02:55:32 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
encryptsave_test_SOURCES = ../auto_tests/encryptsave_test.c
|
|
|
|
encryptsave_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
encryptsave_test_LDADD = $(AUTOTEST_LDADD)
|
2013-11-07 03:32:02 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
file_saving_test_SOURCES = ../auto_tests/file_saving_test.c
|
|
|
|
file_saving_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
file_saving_test_LDADD = $(AUTOTEST_LDADD)
|
2013-11-07 03:32:02 +08:00
|
|
|
|
2024-01-15 06:14:14 +08:00
|
|
|
file_streaming_test_SOURCES = ../auto_tests/file_streaming_test.c
|
|
|
|
file_streaming_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
|
|
|
file_streaming_test_LDADD = $(AUTOTEST_LDADD)
|
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
file_transfer_test_SOURCES = ../auto_tests/file_transfer_test.c
|
|
|
|
file_transfer_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
file_transfer_test_LDADD = $(AUTOTEST_LDADD)
|
2013-09-16 05:39:09 +08:00
|
|
|
|
2020-12-31 08:00:00 +08:00
|
|
|
forwarding_test_SOURCES = ../auto_tests/forwarding_test.c
|
|
|
|
forwarding_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
|
|
|
forwarding_test_LDADD = $(AUTOTEST_LDADD)
|
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
friend_connection_test_SOURCES = ../auto_tests/friend_connection_test.c
|
|
|
|
friend_connection_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
friend_connection_test_LDADD = $(AUTOTEST_LDADD)
|
2013-09-16 05:39:09 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
friend_request_test_SOURCES = ../auto_tests/friend_request_test.c
|
|
|
|
friend_request_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
friend_request_test_LDADD = $(AUTOTEST_LDADD)
|
2014-01-01 12:18:37 +08:00
|
|
|
|
2022-09-22 21:36:19 +08:00
|
|
|
group_state_test_SOURCES = ../auto_tests/group_state_test.c
|
|
|
|
group_state_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
|
|
|
group_state_test_LDADD = $(AUTOTEST_LDADD)
|
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
invalid_tcp_proxy_test_SOURCES = ../auto_tests/invalid_tcp_proxy_test.c
|
|
|
|
invalid_tcp_proxy_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
invalid_tcp_proxy_test_LDADD = $(AUTOTEST_LDADD)
|
2014-01-01 12:18:37 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
invalid_udp_proxy_test_SOURCES = ../auto_tests/invalid_udp_proxy_test.c
|
|
|
|
invalid_udp_proxy_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
invalid_udp_proxy_test_LDADD = $(AUTOTEST_LDADD)
|
2014-01-01 12:18:37 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
lan_discovery_test_SOURCES = ../auto_tests/lan_discovery_test.c
|
|
|
|
lan_discovery_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
lan_discovery_test_LDADD = $(AUTOTEST_LDADD)
|
2014-01-01 12:18:37 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
lossless_packet_test_SOURCES = ../auto_tests/lossless_packet_test.c
|
|
|
|
lossless_packet_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
lossless_packet_test_LDADD = $(AUTOTEST_LDADD)
|
2014-04-11 08:46:24 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
lossy_packet_test_SOURCES = ../auto_tests/lossy_packet_test.c
|
|
|
|
lossy_packet_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
lossy_packet_test_LDADD = $(AUTOTEST_LDADD)
|
2014-04-11 08:46:24 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
network_test_SOURCES = ../auto_tests/network_test.c
|
|
|
|
network_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
network_test_LDADD = $(AUTOTEST_LDADD)
|
2014-01-01 12:18:37 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
onion_test_SOURCES = ../auto_tests/onion_test.c
|
|
|
|
onion_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
onion_test_LDADD = $(AUTOTEST_LDADD)
|
2014-08-08 20:40:21 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
overflow_recvq_test_SOURCES = ../auto_tests/overflow_recvq_test.c
|
|
|
|
overflow_recvq_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
overflow_recvq_test_LDADD = $(AUTOTEST_LDADD)
|
2014-08-08 20:40:21 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
overflow_sendq_test_SOURCES = ../auto_tests/overflow_sendq_test.c
|
|
|
|
overflow_sendq_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
overflow_sendq_test_LDADD = $(AUTOTEST_LDADD)
|
2014-08-08 20:40:21 +08:00
|
|
|
|
2018-08-15 00:37:32 +08:00
|
|
|
reconnect_test_SOURCES = ../auto_tests/reconnect_test.c
|
|
|
|
reconnect_test_CFLAGS = $(AUTO_TEST_CFLAGS)
|
|
|
|
reconnect_test_LDADD = $(AUTOTEST_LDADD)
|
|
|
|
|
2018-08-26 06:50:26 +08:00
|
|
|
save_compatibility_test_SOURCES = ../auto_tests/save_compatibility_test.c
|
|
|
|
save_compatibility_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
|
|
|
save_compatibility_test_LDADD = $(AUTOTEST_LDADD)
|
2018-08-23 00:04:43 +08:00
|
|
|
|
|
|
|
save_friend_test_SOURCES = ../auto_tests/save_friend_test.c
|
|
|
|
save_friend_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
save_friend_test_LDADD = $(AUTOTEST_LDADD)
|
2014-05-24 22:02:01 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
send_message_test_SOURCES = ../auto_tests/send_message_test.c
|
|
|
|
send_message_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
send_message_test_LDADD = $(AUTOTEST_LDADD)
|
2017-01-23 21:45:46 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
set_name_test_SOURCES = ../auto_tests/set_name_test.c
|
|
|
|
set_name_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
set_name_test_LDADD = $(AUTOTEST_LDADD)
|
2014-04-05 23:09:44 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
set_status_message_test_SOURCES = ../auto_tests/set_status_message_test.c
|
|
|
|
set_status_message_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
set_status_message_test_LDADD = $(AUTOTEST_LDADD)
|
2014-04-05 23:09:44 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
TCP_test_SOURCES = ../auto_tests/TCP_test.c
|
|
|
|
TCP_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
TCP_test_LDADD = $(AUTOTEST_LDADD)
|
2014-05-03 07:46:03 +08:00
|
|
|
|
2022-02-07 07:53:41 +08:00
|
|
|
tox_dispatch_test_SOURCES = ../auto_tests/tox_dispatch_test.c
|
|
|
|
tox_dispatch_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
|
|
|
tox_dispatch_test_LDADD = $(AUTOTEST_LDADD)
|
|
|
|
|
2024-01-12 21:49:20 +08:00
|
|
|
tox_events_test_SOURCES = ../auto_tests/tox_events_test.c
|
|
|
|
tox_events_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
|
|
|
tox_events_test_LDADD = $(AUTOTEST_LDADD)
|
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
tox_many_tcp_test_SOURCES = ../auto_tests/tox_many_tcp_test.c
|
|
|
|
tox_many_tcp_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
tox_many_tcp_test_LDADD = $(AUTOTEST_LDADD)
|
2014-05-03 07:46:03 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
tox_many_test_SOURCES = ../auto_tests/tox_many_test.c
|
|
|
|
tox_many_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
tox_many_test_LDADD = $(AUTOTEST_LDADD)
|
2014-04-05 23:09:44 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
tox_strncasecmp_test_SOURCES = ../auto_tests/tox_strncasecmp_test.c
|
|
|
|
tox_strncasecmp_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
tox_strncasecmp_test_LDADD = $(AUTOTEST_LDADD)
|
2014-09-12 10:28:50 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
typing_test_SOURCES = ../auto_tests/typing_test.c
|
|
|
|
typing_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
typing_test_LDADD = $(AUTOTEST_LDADD)
|
2014-09-12 10:28:50 +08:00
|
|
|
|
2018-08-23 00:04:43 +08:00
|
|
|
version_test_SOURCES = ../auto_tests/version_test.c
|
|
|
|
version_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
2018-07-29 07:54:44 +08:00
|
|
|
version_test_LDADD = $(AUTOTEST_LDADD)
|
2014-09-12 10:28:50 +08:00
|
|
|
|
2018-07-29 07:54:44 +08:00
|
|
|
if BUILD_AV
|
2014-09-12 10:28:50 +08:00
|
|
|
|
2019-02-10 08:00:00 +08:00
|
|
|
conference_av_test_SOURCES = ../auto_tests/conference_av_test.c
|
|
|
|
conference_av_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
|
|
|
conference_av_test_LDADD = $(AUTOTEST_LDADD)
|
|
|
|
|
2018-07-29 07:54:44 +08:00
|
|
|
toxav_basic_test_SOURCES = ../auto_tests/toxav_basic_test.c
|
|
|
|
toxav_basic_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
|
|
|
toxav_basic_test_LDADD = $(AUTOTEST_LDADD) $(AV_LIBS)
|
2014-09-12 10:28:50 +08:00
|
|
|
|
2018-07-29 07:54:44 +08:00
|
|
|
toxav_many_test_SOURCES = ../auto_tests/toxav_many_test.c
|
|
|
|
toxav_many_test_CFLAGS = $(AUTOTEST_CFLAGS)
|
|
|
|
toxav_many_test_LDADD = $(AUTOTEST_LDADD)
|
2017-02-27 01:56:55 +08:00
|
|
|
|
2018-07-29 07:54:44 +08:00
|
|
|
endif
|
2017-02-27 01:56:55 +08:00
|
|
|
|
2018-07-29 07:54:44 +08:00
|
|
|
endif
|
2017-02-27 01:56:55 +08:00
|
|
|
|
|
|
|
|
2018-08-26 06:50:26 +08:00
|
|
|
EXTRA_DIST += \
|
|
|
|
$(top_srcdir)/auto_tests/data/save.tox \
|
|
|
|
$(top_srcdir)/auto_tests/check_compat.h \
|
2022-01-26 03:25:36 +08:00
|
|
|
$(top_srcdir)/auto_tests/auto_test_support.h
|