test_resume fix
This commit is contained in:
parent
5145664562
commit
afb5d842ff
10
appveyor.yml
10
appveyor.yml
|
@ -60,26 +60,26 @@ build_script:
|
||||||
# examples
|
# examples
|
||||||
- cd %ROOT_DIRECTORY%\examples
|
- cd %ROOT_DIRECTORY%\examples
|
||||||
- if defined bjam (
|
- if defined bjam (
|
||||||
b2.exe --abbreviate-paths openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on
|
b2.exe --hash openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on
|
||||||
)
|
)
|
||||||
|
|
||||||
# tools
|
# tools
|
||||||
- cd %ROOT_DIRECTORY%\tools
|
- cd %ROOT_DIRECTORY%\tools
|
||||||
- if defined bjam (
|
- if defined bjam (
|
||||||
b2.exe --abbreviate-paths openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on
|
b2.exe --hash openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on
|
||||||
)
|
)
|
||||||
|
|
||||||
# test
|
# test
|
||||||
- cd %ROOT_DIRECTORY%\test
|
- cd %ROOT_DIRECTORY%\test
|
||||||
- if defined bjam (
|
- if defined bjam (
|
||||||
b2.exe --abbreviate-paths openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on testing.execute=off
|
b2.exe --hash openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on testing.execute=off
|
||||||
)
|
)
|
||||||
|
|
||||||
# python binding
|
# python binding
|
||||||
- cd %ROOT_DIRECTORY%\bindings\python
|
- cd %ROOT_DIRECTORY%\bindings\python
|
||||||
# we use 64 bit python builds
|
# we use 64 bit python builds
|
||||||
- if defined python (
|
- if defined python (
|
||||||
b2.exe --abbreviate-paths openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on libtorrent-link=shared stage_module stage_dependencies
|
b2.exe --hash openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on libtorrent-link=shared stage_module stage_dependencies
|
||||||
)
|
)
|
||||||
|
|
||||||
# simulations
|
# simulations
|
||||||
|
@ -99,7 +99,7 @@ build_script:
|
||||||
test_script:
|
test_script:
|
||||||
- cd %ROOT_DIRECTORY%\test
|
- cd %ROOT_DIRECTORY%\test
|
||||||
- if defined bjam (
|
- if defined bjam (
|
||||||
appveyor-retry b2.exe -l500 --abbreviate-paths openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on win-tests
|
appveyor-retry b2.exe -l500 --hash openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on win-tests
|
||||||
)
|
)
|
||||||
|
|
||||||
- cd %ROOT_DIRECTORY%\bindings\python
|
- cd %ROOT_DIRECTORY%\bindings\python
|
||||||
|
|
|
@ -214,7 +214,7 @@ alert const* wait_for_alert(lt::session& ses, int type, char const* name
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
time_point now = clock_type::now();
|
time_point const now = clock_type::now();
|
||||||
if (now > end_time) return nullptr;
|
if (now > end_time) return nullptr;
|
||||||
|
|
||||||
alert const* ret = nullptr;
|
alert const* ret = nullptr;
|
||||||
|
|
|
@ -50,6 +50,11 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
#ifdef TORRENT_WINDOWS
|
||||||
|
#define SEP "\\"
|
||||||
|
#else
|
||||||
|
#define SEP "/"
|
||||||
|
#endif
|
||||||
using namespace lt;
|
using namespace lt;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -277,13 +282,13 @@ TORRENT_TEST(piece_slots)
|
||||||
std::shared_ptr<torrent_info> ti = generate_torrent();
|
std::shared_ptr<torrent_info> ti = generate_torrent();
|
||||||
|
|
||||||
error_code ec;
|
error_code ec;
|
||||||
create_directories(combine_path("add_torrent_params_test", "test_resume"), ec);
|
create_directories("add_torrent_params_test" SEP "test_resume", ec);
|
||||||
{
|
{
|
||||||
std::vector<char> a(128 * 1024 * 8);
|
std::vector<char> a(128 * 1024 * 8);
|
||||||
std::vector<char> b(128 * 1024);
|
std::vector<char> b(128 * 1024);
|
||||||
std::ofstream("add_torrent_params_test/test_resume/tmp1").write(a.data(), std::streamsize(a.size()));
|
std::ofstream("add_torrent_params_test" SEP "test_resume" SEP "tmp1").write(a.data(), std::streamsize(a.size()));
|
||||||
std::ofstream("add_torrent_params_test/test_resume/tmp2").write(b.data(), std::streamsize(b.size()));
|
std::ofstream("add_torrent_params_test" SEP "test_resume" SEP "tmp2").write(b.data(), std::streamsize(b.size()));
|
||||||
std::ofstream("add_torrent_params_test/test_resume/tmp3").write(b.data(), std::streamsize(b.size()));
|
std::ofstream("add_torrent_params_test" SEP "test_resume" SEP "tmp3").write(b.data(), std::streamsize(b.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
add_torrent_params p;
|
add_torrent_params p;
|
||||||
|
@ -340,9 +345,9 @@ void test_piece_slots_seed(settings_pack const& sett)
|
||||||
{
|
{
|
||||||
std::vector<char> a(128 * 1024 * 8);
|
std::vector<char> a(128 * 1024 * 8);
|
||||||
std::vector<char> b(128 * 1024);
|
std::vector<char> b(128 * 1024);
|
||||||
std::ofstream("add_torrent_params_test/test_resume/tmp1").write(a.data(), std::streamsize(a.size()));
|
std::ofstream("add_torrent_params_test" SEP "test_resume" SEP "tmp1").write(a.data(), std::streamsize(a.size()));
|
||||||
std::ofstream("add_torrent_params_test/test_resume/tmp2").write(b.data(), std::streamsize(b.size()));
|
std::ofstream("add_torrent_params_test" SEP "test_resume" SEP "tmp2").write(b.data(), std::streamsize(b.size()));
|
||||||
std::ofstream("add_torrent_params_test/test_resume/tmp3").write(b.data(), std::streamsize(b.size()));
|
std::ofstream("add_torrent_params_test" SEP "test_resume" SEP "tmp3").write(b.data(), std::streamsize(b.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
add_torrent_params p;
|
add_torrent_params p;
|
||||||
|
|
Loading…
Reference in New Issue