2011-04-10 01:50:33 +02:00
|
|
|
import testing ;
|
2013-09-03 03:19:42 +02:00
|
|
|
import feature : feature ;
|
2011-04-10 01:50:33 +02:00
|
|
|
|
2005-08-11 13:06:52 +02:00
|
|
|
use-project /torrent : .. ;
|
|
|
|
|
2013-06-21 03:06:40 +02:00
|
|
|
lib libtorrent_test
|
|
|
|
: # sources
|
2015-06-20 17:08:26 +02:00
|
|
|
main.cpp
|
2015-05-31 14:21:16 +02:00
|
|
|
test.cpp
|
2013-06-21 03:06:40 +02:00
|
|
|
setup_transfer.cpp
|
|
|
|
dht_server.cpp
|
2014-02-23 02:32:55 +01:00
|
|
|
udp_tracker.cpp
|
2013-06-21 03:06:40 +02:00
|
|
|
peer_server.cpp
|
2016-01-31 03:33:47 +01:00
|
|
|
bittorrent_peer.cpp
|
|
|
|
print_alerts.cpp
|
2013-09-30 00:50:06 +02:00
|
|
|
web_seed_suite.cpp
|
2014-10-12 10:39:14 +02:00
|
|
|
swarm_suite.cpp
|
2015-04-24 05:48:08 +02:00
|
|
|
test_utils.cpp
|
2015-08-08 03:28:51 +02:00
|
|
|
settings.cpp
|
2016-01-22 05:32:20 +01:00
|
|
|
make_torrent.cpp
|
2013-06-23 19:36:00 +02:00
|
|
|
|
2013-06-21 03:06:40 +02:00
|
|
|
: # requirements
|
2013-06-23 19:36:00 +02:00
|
|
|
# this is used to determine whether
|
|
|
|
# symbols are exported or imported
|
|
|
|
<link>shared:<define>TORRENT_BUILDING_TEST_SHARED
|
2013-08-22 10:12:35 +02:00
|
|
|
<link>shared:<define>ED25519_BUILD_DLL
|
|
|
|
<include>../ed25519/src
|
2013-08-28 08:39:39 +02:00
|
|
|
<target-os>windows:<library>advapi32
|
2016-07-05 17:25:31 +02:00
|
|
|
<library>/torrent//torrent
|
|
|
|
<export-extra>on
|
2017-04-02 20:22:17 +02:00
|
|
|
<conditional>@warnings
|
2013-06-23 19:36:00 +02:00
|
|
|
|
|
|
|
: # default build
|
|
|
|
<link>shared
|
2013-09-18 10:42:30 +02:00
|
|
|
|
|
|
|
: # user-requirements
|
|
|
|
<link>shared:<define>TORRENT_LINK_TEST_SHARED
|
2015-08-08 03:28:51 +02:00
|
|
|
<include>.
|
2013-06-21 03:06:40 +02:00
|
|
|
;
|
|
|
|
|
2014-04-27 18:54:10 +02:00
|
|
|
explicit libtorrent_test ;
|
|
|
|
|
2013-08-28 08:39:39 +02:00
|
|
|
lib advapi32 : : <name>Advapi32 ;
|
|
|
|
|
2019-11-17 13:33:47 +01:00
|
|
|
variant debug-mode : debug : <asserts>on <debug-iterators>on <invariant-checks>full ;
|
|
|
|
|
2019-09-15 16:12:34 +02:00
|
|
|
local default-build =
|
|
|
|
<threading>multi
|
|
|
|
<link>shared
|
|
|
|
<picker-debugging>on
|
|
|
|
<logging>on
|
2019-11-17 13:33:47 +01:00
|
|
|
<variant>debug-mode
|
2019-09-15 16:12:34 +02:00
|
|
|
;
|
|
|
|
|
2007-07-06 22:17:36 +02:00
|
|
|
project
|
2015-05-23 03:38:47 +02:00
|
|
|
: requirements
|
2016-07-05 17:25:31 +02:00
|
|
|
<export-extra>on
|
|
|
|
<library>libtorrent_test
|
|
|
|
<library>/torrent//torrent
|
2018-02-02 13:28:01 +01:00
|
|
|
# C4127: conditional expression is constant
|
|
|
|
<toolset>msvc:<cflags>/wd4127
|
|
|
|
# C4309: 'conversion' : truncation of constant value
|
|
|
|
<toolset>msvc:<cflags>/wd4309
|
|
|
|
# C4310: cast truncates constant value
|
|
|
|
<toolset>msvc:<cflags>/wd4310
|
2018-11-16 16:19:12 +01:00
|
|
|
# C4268: 'identifier' : 'const' static/global data initialized
|
|
|
|
# with compiler generated default constructor fills the object with zeros
|
|
|
|
<toolset>msvc:<cflags>/wd4268
|
2018-02-02 13:28:01 +01:00
|
|
|
<conditional>@warnings
|
2016-07-03 17:42:57 +02:00
|
|
|
<export-extra>on
|
2015-05-23 03:38:47 +02:00
|
|
|
: default-build
|
2019-09-15 16:12:34 +02:00
|
|
|
$(default-build)
|
2015-05-30 06:31:23 +02:00
|
|
|
;
|
2005-08-11 13:06:52 +02:00
|
|
|
|
2013-09-03 03:19:42 +02:00
|
|
|
feature launcher : none valgrind : composite ;
|
2014-11-09 12:17:13 +01:00
|
|
|
feature.compose <launcher>valgrind : <testing.launcher>"valgrind --tool=memcheck -v --num-callers=20 --read-var-info=yes --track-origins=yes --error-exitcode=222 --suppressions=valgrind_suppressions.txt" <use-valgrind>on ;
|
2013-09-03 03:19:42 +02:00
|
|
|
|
2018-07-29 09:05:32 +02:00
|
|
|
exe test_natpmp : test_natpmp.cpp
|
|
|
|
: # requirements
|
|
|
|
<library>/torrent//torrent
|
|
|
|
<export-extra>on
|
|
|
|
<conditional>@warnings
|
|
|
|
: # default-build
|
2019-09-15 16:12:34 +02:00
|
|
|
$(default-build)
|
2018-07-29 09:05:32 +02:00
|
|
|
;
|
|
|
|
|
|
|
|
exe enum_if : enum_if.cpp
|
|
|
|
: # requirements
|
|
|
|
<library>/torrent//torrent
|
|
|
|
<export-extra>on
|
|
|
|
<conditional>@warnings
|
|
|
|
: # default-build
|
2019-09-15 16:12:34 +02:00
|
|
|
$(default-build)
|
2018-07-29 09:05:32 +02:00
|
|
|
;
|
|
|
|
|
|
|
|
install stage_enum_if : enum_if : <location>. ;
|
|
|
|
|
|
|
|
explicit test_natpmp ;
|
|
|
|
explicit enum_if ;
|
|
|
|
explicit stage_enum_if ;
|
|
|
|
|
2018-11-14 14:48:05 +01:00
|
|
|
run test_listen_socket.cpp
|
|
|
|
: : : <crypto>openssl:<library>/torrent//ssl
|
|
|
|
<crypto>openssl:<library>/torrent//crypto ;
|
2017-10-10 14:25:12 +02:00
|
|
|
|
2018-11-14 14:48:05 +01:00
|
|
|
run test_dht.cpp
|
|
|
|
test_dht_storage.cpp
|
|
|
|
test_direct_dht.cpp
|
|
|
|
: : : <crypto>openssl:<library>/torrent//ssl
|
|
|
|
<crypto>openssl:<library>/torrent//crypto ;
|
2016-07-20 16:53:33 +02:00
|
|
|
|
2019-09-15 16:12:34 +02:00
|
|
|
run test_primitives.cpp ;
|
|
|
|
run test_io.cpp ;
|
|
|
|
run test_create_torrent.cpp ;
|
|
|
|
run test_packet_buffer.cpp ;
|
|
|
|
run test_timestamp_history.cpp ;
|
|
|
|
run test_bloom_filter.cpp ;
|
|
|
|
run test_identify_client.cpp ;
|
|
|
|
run test_merkle.cpp ;
|
|
|
|
run test_resolve_links.cpp ;
|
|
|
|
run test_heterogeneous_queue.cpp ;
|
|
|
|
run test_ip_voter.cpp ;
|
|
|
|
run test_sliding_average.cpp ;
|
|
|
|
run test_socket_io.cpp ;
|
|
|
|
run test_part_file.cpp ;
|
|
|
|
run test_peer_list.cpp ;
|
|
|
|
run test_torrent_info.cpp ;
|
|
|
|
run test_time.cpp ;
|
|
|
|
run test_file_storage.cpp ;
|
|
|
|
run test_peer_priority.cpp ;
|
|
|
|
run test_threads.cpp ;
|
|
|
|
run test_tailqueue.cpp ;
|
|
|
|
run test_bandwidth_limiter.cpp ;
|
|
|
|
run test_buffer.cpp ;
|
|
|
|
run test_bencoding.cpp ;
|
|
|
|
run test_bdecode.cpp ;
|
|
|
|
run test_http_parser.cpp ;
|
|
|
|
run test_xml.cpp ;
|
|
|
|
run test_ip_filter.cpp ;
|
|
|
|
run test_block_cache.cpp ;
|
|
|
|
run test_peer_classes.cpp ;
|
|
|
|
run test_settings_pack.cpp ;
|
|
|
|
run test_fence.cpp ;
|
|
|
|
run test_dos_blocker.cpp ;
|
|
|
|
run test_stat_cache.cpp ;
|
|
|
|
run test_enum_net.cpp ;
|
|
|
|
run test_linked_list.cpp ;
|
|
|
|
run test_stack_allocator.cpp ;
|
|
|
|
run test_file_progress.cpp ;
|
|
|
|
run test_generate_peer_id.cpp ;
|
|
|
|
run test_alloca.cpp ;
|
|
|
|
run test_piece_picker.cpp ;
|
|
|
|
run test_string.cpp ;
|
|
|
|
run test_utf8.cpp ;
|
2019-04-02 13:15:57 +02:00
|
|
|
run test_hasher.cpp ;
|
|
|
|
run test_hasher512.cpp ;
|
2018-11-14 14:48:05 +01:00
|
|
|
run test_sha1_hash.cpp ;
|
|
|
|
run test_span.cpp ;
|
|
|
|
run test_bitfield.cpp ;
|
|
|
|
run test_crc32.cpp ;
|
|
|
|
run test_ffs.cpp ;
|
|
|
|
run test_ed25519.cpp ;
|
|
|
|
run test_gzip.cpp ;
|
|
|
|
run test_receive_buffer.cpp ;
|
|
|
|
run test_alert_manager.cpp ;
|
|
|
|
run test_alert_types.cpp ;
|
|
|
|
run test_magnet.cpp ;
|
|
|
|
run test_storage.cpp ;
|
|
|
|
run test_session.cpp ;
|
|
|
|
run test_session_params.cpp ;
|
|
|
|
run test_read_piece.cpp ;
|
|
|
|
run test_remove_torrent.cpp ;
|
|
|
|
run test_flags.cpp ;
|
|
|
|
run test_file.cpp ;
|
|
|
|
run test_fast_extension.cpp ;
|
|
|
|
run test_privacy.cpp ;
|
|
|
|
run test_recheck.cpp ;
|
|
|
|
run test_read_resume.cpp ;
|
|
|
|
run test_resume.cpp ;
|
|
|
|
run test_ssl.cpp : :
|
|
|
|
: <crypto>openssl:<library>/torrent//ssl
|
|
|
|
<crypto>openssl:<library>/torrent//crypto ;
|
|
|
|
run test_tracker.cpp ;
|
|
|
|
run test_checking.cpp ;
|
|
|
|
run test_url_seed.cpp ;
|
|
|
|
run test_web_seed.cpp ;
|
|
|
|
run test_web_seed_redirect.cpp ;
|
|
|
|
run test_web_seed_socks4.cpp ;
|
|
|
|
run test_web_seed_socks5.cpp ;
|
|
|
|
run test_web_seed_socks5_no_peers.cpp ;
|
|
|
|
run test_web_seed_socks5_pw.cpp ;
|
|
|
|
run test_web_seed_http.cpp ;
|
|
|
|
run test_web_seed_http_pw.cpp ;
|
|
|
|
run test_web_seed_chunked.cpp ;
|
|
|
|
run test_web_seed_ban.cpp ;
|
|
|
|
run test_pe_crypto.cpp ;
|
2009-04-26 02:32:19 +02:00
|
|
|
|
2018-11-14 14:48:05 +01:00
|
|
|
run test_remap_files.cpp ;
|
|
|
|
run test_utp.cpp ;
|
|
|
|
run test_auto_unchoke.cpp ;
|
|
|
|
run test_http_connection.cpp : :
|
2017-10-09 01:21:19 +02:00
|
|
|
: <crypto>openssl:<library>/torrent//ssl
|
|
|
|
<crypto>openssl:<library>/torrent//crypto
|
2018-11-14 14:48:05 +01:00
|
|
|
;
|
|
|
|
run test_torrent.cpp ;
|
|
|
|
run test_transfer.cpp ;
|
|
|
|
run test_time_critical.cpp ;
|
|
|
|
run test_pex.cpp ;
|
|
|
|
run test_priority.cpp ;
|
2015-06-06 20:59:04 +02:00
|
|
|
|
2015-08-09 23:54:10 +02:00
|
|
|
# turn these tests into simulations
|
2018-11-14 14:48:05 +01:00
|
|
|
run test_upnp.cpp ;
|
|
|
|
|
|
|
|
run test_lsd.cpp ;
|
|
|
|
explicit test_lsd ;
|
2019-04-02 13:15:57 +02:00
|
|
|
explicit test_hasher ;
|
|
|
|
explicit test_hasher512 ;
|
2005-08-11 13:06:52 +02:00
|
|
|
|
2015-08-09 23:54:10 +02:00
|
|
|
# these are the tests run on appveyor, while the flapping ones are being
|
|
|
|
# transitioned into simulations
|
|
|
|
alias win-tests :
|
|
|
|
test_primitives
|
2016-09-05 21:17:12 +02:00
|
|
|
test_string
|
2016-07-20 16:53:33 +02:00
|
|
|
test_dht
|
|
|
|
test_sha1_hash
|
2018-11-14 14:48:05 +01:00
|
|
|
test_span
|
2016-07-20 16:53:33 +02:00
|
|
|
test_bitfield
|
|
|
|
test_crc32
|
2015-08-09 23:54:10 +02:00
|
|
|
test_pe_crypto
|
|
|
|
test_remap_files
|
|
|
|
test_auto_unchoke
|
|
|
|
test_torrent
|
|
|
|
test_transfer
|
|
|
|
test_time_critical
|
|
|
|
test_pex
|
|
|
|
test_priority
|
|
|
|
test_storage
|
|
|
|
test_session
|
|
|
|
test_read_piece
|
|
|
|
test_file
|
|
|
|
test_fast_extension
|
|
|
|
test_recheck
|
|
|
|
test_resume
|
|
|
|
test_tracker
|
|
|
|
test_checking
|
2016-08-21 20:43:44 +02:00
|
|
|
test_gzip
|
2016-08-06 19:49:23 +02:00
|
|
|
test_piece_picker
|
2016-08-12 02:32:14 +02:00
|
|
|
test_ffs
|
2016-08-30 02:28:42 +02:00
|
|
|
test_ed25519
|
2016-08-12 02:32:14 +02:00
|
|
|
test_session_params
|
2015-08-09 23:54:10 +02:00
|
|
|
;
|
|
|
|
|
|
|
|
explicit win-tests ;
|
|
|
|
|
2016-06-26 18:01:42 +02:00
|
|
|
alias arm-tests :
|
2016-08-12 02:32:14 +02:00
|
|
|
test_sha1_hash
|
|
|
|
test_bitfield
|
|
|
|
test_crc32
|
|
|
|
test_ffs
|
2016-08-30 02:28:42 +02:00
|
|
|
test_ed25519
|
2016-08-12 02:32:14 +02:00
|
|
|
;
|
2016-06-26 18:01:42 +02:00
|
|
|
|
|
|
|
explicit arm-tests ;
|