Commit Graph

294 Commits

Author SHA1 Message Date
AllSeeingEyeTolledEweSew cbb4f0277e Make tests and tools python3 compatible. 2020-05-13 00:17:37 +02:00
arvidn 97a79d2dba fixed restoring of trackers, comment, creation date and created-by in resume data 2019-11-25 14:21:55 +01:00
Arvid Norberg afb5d842ff test_resume fix 2019-11-19 01:46:39 +01:00
Arvid Norberg 5145664562 force python interpreter for mingw build on appveyor 2019-11-19 01:46:39 +01:00
Arvid Norberg 54edd434f4 wait until python gets running to open its socket 2019-11-19 01:46:39 +01:00
Arvid Norberg 76f53297a9 update appveyor image and boost version. explicitly use python2 for test scripts (as the SSL behavior has changed in python 3 in non-trivial ways) 2019-11-19 01:46:39 +01:00
Arvid Norberg f40ecac4dd improve testing on appveyor. revert appveyor image 2019-08-06 21:55:47 -07:00
Arvid Norberg f23f96ea1f fix win32 test stdout redirection 2019-08-06 21:55:47 -07:00
arvidn 5260128933 minor improvement to test_tracker. fix test output redirection on windows. tweak starting of web server in tests 2019-03-28 00:22:05 +01:00
arvidn 4473a8d0ce fix seed_mode flag 2019-02-24 10:20:20 +01:00
arvidn 7f2a78d0c9 make random_shuffle() take a range instead of two iterators. use random_bytes() instead of std::generate() and random_byte(). Remove unused hasher.hpp includes 2019-02-19 01:48:08 +01:00
arvidn f4f1425115 use UNC paths pervasively on windows 2019-01-12 21:00:40 +01:00
arvidn 5383854768 make span's and sha1_hash's index and size types signed (instead of unsigned). Specifically std::ptrdiff_t. In line with the direction of gsl span and reduce signed->unsigned casts 2018-11-16 14:06:22 +01:00
arvidn 6be8b395da some cleanup turning memcmp() and memcpy() into span comparisons and std::copy(). some more use of random_bytes() instead of loops. 2018-11-05 18:52:45 +01:00
arvidn 109db58641 merge RC_1_1 into master 2018-09-25 21:33:29 -07:00
arvidn 6c4d1b9143 back-port the patch to split up the progress_notification alert_mask into three new categories, file-, piece- and block progress 2018-09-24 08:52:30 -07:00
Arvid Norberg b90564d418 remove the IPv6 enable/disable build config 2018-08-19 22:20:54 +02:00
arvidn 4096085bf8 merged RC_1_1 into master 2018-07-30 13:44:44 +02:00
arvidn 19df645012 apply piece priorities immediately, even though file priority updares are async. save both file- and piece priorities in fast resume. when loading, apply file prios first, then piece prios 2018-07-29 21:53:01 +02:00
Arvid Norberg 107337f821 make tests print more of peer logs 2018-06-23 23:09:45 +02:00
arvidn 5530793c75 improve the API for iterating over all files and pieces, with the new strong index types. 2018-06-12 11:44:29 +02:00
Arvid Norberg 0e49051f17 make create_random_files() take a span instead of pointer, length parameters 2018-06-11 01:35:31 +02:00
Arvid Norberg 1b62aff9d1 minor improvements to test_checking 2018-06-10 16:25:10 +02:00
arvidn fe612ca167 replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options 2018-05-13 19:25:17 +02:00
Arvid Norberg 6efff919cd deprecated alert::progress_notification alert category, split into finer grained categories 2018-04-05 16:27:28 +02:00
arvidn d080c6f532 merged RC_1_1 into master 2018-03-26 12:56:25 +02:00
d_komarov 1c867a5026 Changing file priorities while checking interrupts checking.
Also, if the last file has zero priority, checking is interrupted prematurely.
2018-03-26 02:59:10 +02:00
arvidn 9df4d4b7f8 replace typedef with using. replace NULL with nullptr. cleanup page_aligned_allocator 2018-03-23 11:19:46 +01:00
arvidn 5c1b65e9b8 merged RC_1_1 into master 2018-03-12 02:32:12 +01:00
arvidn a06e4f696b track whether a file is eligible for using the partfile on a per-file basis. This is intended to improve backwards compatibility, to better support resuming files downloaded with older versions of libtorrent 2018-03-11 12:52:56 +01:00
arvidn 9696082355 merged RC_1_1 into master 2018-02-25 09:36:12 +01:00
d-komarov 41b3d437de Fix and improve setup_transfer
Numerous issues cause test fails on Windows(and Linux?). Most of them
found in print_alerts procedure.

Make print_alerts predicate check short-circuit, i.e. exit early on
first match. Fixes cases when appropriate variable may be re-assigned
multiple times with incorrect values.

Make stop_process wait until actual process successfully terminates.
This change is applicable to Windows only and helps to avoid tests
cleanup errors.

Make stop_proxy procedure do what it suppose to do. Previously it was
doing nothing with intention that all proxies are stopped after test
completion. Under Windows there are problems with proxy that has it's
socket connection abandoned. Thus failing the rest of test cases.

* Fix stop_all_proxies map using incorrect key to erase elements
* Fix wait_for_alert case with negative 'num'
* Make print_alerts predicate const& to avoid extra copy
* Make listen_alert and downloading_alert predicate procs reentrant
2018-02-19 23:23:15 +01:00
arvidn 4fef787212 merged RC_1_1 into master 2018-01-24 00:37:05 +01:00
arvidn efd096d879 use unique peer_ids per connection 2018-01-23 16:40:16 +01:00
Arvid Norberg 60b74d2616 merged RC_1_1 into master 2017-10-10 14:25:12 +02:00
Arvid Norberg 830ef0bedd prevent dependency on openssl from leaking outside of libtorrent (libssl and libcrypto should not be a usage requirement). This cleans up most tests to build without having to also link against openssl 2017-10-09 17:15:35 +02:00
arvidn 865ff09a84 merge RC_1_1 into master 2017-08-10 16:44:57 +02:00
arvidn 378a0e974b fix issue of force-recheck or seeding from read-only media, torrents with empty files in them. Previously libtorrent would create empty files up-front unconditionally, now they won't be created if they already exist 2017-08-09 18:48:49 +02:00
arvidn c4eb4c8b5f use span in torrent_info constructors and deprecate the redundant flags argument 2017-07-22 00:00:44 -07:00
arvidn 4947602a2f make add_torrent_params::flags_t an enum class and move it out into its own header 2017-07-17 01:05:31 -07:00
AllSeeingEyeTolledEweSew 00655d562b Refactor several flags to torrent_handle::get_flags/set_flags. 2017-07-17 01:05:31 -07:00
arvidn c4afb5e949 use a dedicated class template for flags types instead of enum class. It's more backwards compatible and improves ergonomics 2017-07-15 01:15:57 -07:00
arvidn ffaabd846c make file open mode flags be an enum class for type-safety 2017-05-28 11:16:59 -04:00
Arvid Norberg 660cdaf2d1 deprecate direct access to array in session_stats_alert (#2033) 2017-05-27 20:33:31 -04:00
Arvid Norberg 1925d1e7aa add test for recent duplicate add bug (#2003) 2017-05-17 23:04:50 -04:00
Steven Siloti a693565df0 hack to get test_stop_tracker_timeout working 2017-04-30 08:11:56 -04:00
arvidn d138f02424 introduce lt namespace alias 2017-04-23 23:43:58 -04:00
arvidn 79d7ae3638 separate path and filesystem functions out into its own translation unit/header file pair, separating it from the file and directory class 2017-04-11 18:07:55 -04:00
Arvid Norberg 64ad4f5c96 enable warnings when building tests (#1880) 2017-04-02 14:22:17 -04:00
arvidn 3a1379ef1e merged RC_1_1 into master 2017-03-14 12:55:13 -04:00