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)
This commit is contained in:
parent
48fa5343b5
commit
76f53297a9
28
appveyor.yml
28
appveyor.yml
|
@ -4,7 +4,7 @@ branches:
|
|||
- master
|
||||
- RC_1_2
|
||||
- RC_1_1
|
||||
image: Previous Visual Studio 2015
|
||||
image: Visual Studio 2017
|
||||
clone_depth: 1
|
||||
environment:
|
||||
matrix:
|
||||
|
@ -38,67 +38,67 @@ install:
|
|||
- if not defined linkflags ( set linkflags="" )
|
||||
- if not defined include ( set include="" )
|
||||
- cd %ROOT_DIRECTORY%
|
||||
- set BOOST_ROOT=c:\Libraries\boost_1_63_0
|
||||
- set BOOST_ROOT=c:\Libraries\boost_1_69_0
|
||||
- set BOOST_BUILD_PATH=%BOOST_ROOT%\tools\build
|
||||
- echo %BOOST_ROOT%
|
||||
- echo %BOOST_BUILD_PATH%
|
||||
- set PATH=%PATH%;%BOOST_BUILD_PATH%\src\engine\bin.ntx86
|
||||
- set PATH=%PATH%;%BOOST_BUILD_PATH%
|
||||
- ps: '"using msvc : 14.0 ;`nusing gcc : : : <cxxflags>-std=c++11 ;`nusing python : 3.5 : c:\\Python35-x64 : c:\\Python35-x64\\include : c:\\Python35-x64\\libs ;`n" | Set-Content $env:HOMEDRIVE\$env:HOMEPATH\user-config.jam'
|
||||
- type %HOMEDRIVE%%HOMEPATH%\user-config.jam
|
||||
- cd %ROOT_DIRECTORY%
|
||||
- set PATH=c:\msys64\mingw32\bin;%PATH%
|
||||
- g++ --version
|
||||
- set PATH=c:\Python27-x64;%PATH%
|
||||
- python --version
|
||||
- echo %ROOT_DIRECTORY%
|
||||
- cd %BOOST_BUILD_PATH%\src\engine
|
||||
- build.bat >nul
|
||||
- cd %BOOST_BUILD_PATH%
|
||||
- bootstrap.bat >nul
|
||||
- cd %ROOT_DIRECTORY%
|
||||
|
||||
build_script:
|
||||
# examples
|
||||
- cd %ROOT_DIRECTORY%\examples
|
||||
- if defined bjam (
|
||||
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%
|
||||
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
|
||||
)
|
||||
|
||||
# tools
|
||||
- cd %ROOT_DIRECTORY%\tools
|
||||
- if defined bjam (
|
||||
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%
|
||||
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
|
||||
)
|
||||
|
||||
# test
|
||||
- cd %ROOT_DIRECTORY%\test
|
||||
- if defined bjam (
|
||||
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% win-tests test_upnp test_natpmp testing.execute=off
|
||||
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
|
||||
)
|
||||
|
||||
# python binding
|
||||
- cd %ROOT_DIRECTORY%\bindings\python
|
||||
# we use 64 bit python builds
|
||||
- if defined python (
|
||||
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% libtorrent-link=shared stage_module stage_dependencies
|
||||
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
|
||||
)
|
||||
|
||||
# simulations
|
||||
- cd %ROOT_DIRECTORY%\simulation
|
||||
- if defined sim (
|
||||
b2.exe --hash openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% debug-iterators=off picker-debugging=on invariant-checks=full test_debug %linkflags% %include% boost-link=default link=static crypto=built-in define=BOOST_ASIO_DISABLE_IOCP testing.execute=off
|
||||
b2.exe --hash openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% debug-iterators=off picker-debugging=on invariant-checks=full test_debug %linkflags% %include% boost-link=default link=static crypto=built-in define=BOOST_ASIO_DISABLE_IOCP asserts=on testing.execute=off
|
||||
)
|
||||
|
||||
# minimal support for cmake build
|
||||
- cd %ROOT_DIRECTORY%
|
||||
- mkdir build && cd build
|
||||
- if defined cmake (
|
||||
set "PATH=c:\Python27-x64;%PATH%" &&
|
||||
cmake -DCMAKE_CXX_STANDARD=11 -Dbuild_tests=ON -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=%python% -Dboost-python-module-name="python" -Dskip-python-runtime-test=true -DPython_ADDITIONAL_VERSIONS="2.7" -G "Visual Studio 14 2015 Win64" .. &&
|
||||
cmake -DCMAKE_CXX_STANDARD=11 -Dbuild_tests=ON -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=%python% -Dboost-python-module-name="python" -Dskip-python-runtime-test=true -DPython_ADDITIONAL_VERSIONS="2.7" -G "Visual Studio 15 2017 Win64" .. &&
|
||||
cmake --build . --config Release -- -verbosity:minimal
|
||||
)
|
||||
|
||||
test_script:
|
||||
- cd %ROOT_DIRECTORY%\test
|
||||
- if defined bjam (
|
||||
appveyor-retry b2.exe -l400 --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% win-tests
|
||||
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
|
||||
)
|
||||
|
||||
- cd %ROOT_DIRECTORY%\bindings\python
|
||||
|
@ -121,5 +121,5 @@ test_script:
|
|||
# certain unexpected terminations (through exceptions)
|
||||
- cd %ROOT_DIRECTORY%\simulation
|
||||
- if defined sim (
|
||||
b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% debug-iterators=off picker-debugging=on invariant-checks=full test_debug %linkflags% %include% boost-link=default link=static crypto=built-in define=BOOST_ASIO_DISABLE_IOCP
|
||||
b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% debug-iterators=off picker-debugging=on invariant-checks=full test_debug %linkflags% %include% boost-link=default link=static crypto=built-in define=BOOST_ASIO_DISABLE_IOCP asserts=on
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ if $(BOOST_ROOT)
|
|||
use-project /boost : $(BOOST_ROOT) ;
|
||||
}
|
||||
|
||||
variant debug-mode : debug : <asserts>on <debug-iterators>on <invariant-checks>on ;
|
||||
variant debug-mode : debug : <asserts>on <debug-iterators>on <invariant-checks>full ;
|
||||
|
||||
project client_test
|
||||
: requirements
|
||||
|
|
|
@ -106,4 +106,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#pragma warning(disable : 4548)
|
||||
// 'conversion' conversion from 'type1' to 'type2', possible loss of data
|
||||
#pragma warning(disable : 4244)
|
||||
// potentially uninitialized local variable '' used
|
||||
#pragma warning(disable : 4701)
|
||||
#endif
|
||||
|
|
|
@ -494,7 +494,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#if !defined(TORRENT_READ_HANDLER_MAX_SIZE)
|
||||
# if defined _GLIBCXX_DEBUG || !defined NDEBUG
|
||||
constexpr std::size_t TORRENT_READ_HANDLER_MAX_SIZE = 400;
|
||||
constexpr std::size_t TORRENT_READ_HANDLER_MAX_SIZE = 432;
|
||||
# else
|
||||
// if this is not divisible by 8, we're wasting space
|
||||
constexpr std::size_t TORRENT_READ_HANDLER_MAX_SIZE = 342;
|
||||
|
@ -503,7 +503,7 @@ constexpr std::size_t TORRENT_READ_HANDLER_MAX_SIZE = 342;
|
|||
|
||||
#if !defined(TORRENT_WRITE_HANDLER_MAX_SIZE)
|
||||
# if defined _GLIBCXX_DEBUG || !defined NDEBUG
|
||||
constexpr std::size_t TORRENT_WRITE_HANDLER_MAX_SIZE = 400;
|
||||
constexpr std::size_t TORRENT_WRITE_HANDLER_MAX_SIZE = 432;
|
||||
# else
|
||||
// if this is not divisible by 8, we're wasting space
|
||||
constexpr std::size_t TORRENT_WRITE_HANDLER_MAX_SIZE = 342;
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace libtorrent { namespace aux {
|
|||
void clear_bufs(span<iovec_t const> bufs)
|
||||
{
|
||||
for (auto buf : bufs)
|
||||
std::fill(buf.begin(), buf.end(), 0);
|
||||
std::fill(buf.begin(), buf.end(), char(0));
|
||||
}
|
||||
|
||||
#if TORRENT_USE_ASSERTS
|
||||
|
|
|
@ -42,14 +42,14 @@ explicit libtorrent_test ;
|
|||
|
||||
lib advapi32 : : <name>Advapi32 ;
|
||||
|
||||
variant debug-mode : debug : <asserts>on <debug-iterators>on <invariant-checks>full ;
|
||||
|
||||
local default-build =
|
||||
<threading>multi
|
||||
<link>shared
|
||||
<asserts>on
|
||||
<invariant-checks>full
|
||||
<picker-debugging>on
|
||||
<logging>on
|
||||
<debug-iterators>on
|
||||
<variant>debug-mode
|
||||
;
|
||||
|
||||
project
|
||||
|
|
|
@ -210,7 +210,7 @@ class ConnectionHandler:
|
|||
break
|
||||
|
||||
|
||||
def start_server(host='localhost', port=8080, IPv6=False, timeout=100,
|
||||
def start_server(host='localhost', port=8080, IPv6=False, timeout=10,
|
||||
handler=ConnectionHandler):
|
||||
if IPv6:
|
||||
soc_type = socket.AF_INET6
|
||||
|
@ -219,6 +219,7 @@ def start_server(host='localhost', port=8080, IPv6=False, timeout=100,
|
|||
soc = socket.socket(soc_type)
|
||||
soc.settimeout(120)
|
||||
print("PROXY - Serving on %s:%d." % (host, port)) # debug
|
||||
print('python version: %s' % sys.version_info.__str__())
|
||||
soc.bind((host, port))
|
||||
soc.listen(0)
|
||||
while True:
|
||||
|
|
|
@ -438,9 +438,9 @@ pid_type async_run(char const* cmdline)
|
|||
char buf[2048];
|
||||
std::snprintf(buf, sizeof(buf), "%s", cmdline);
|
||||
|
||||
std::printf("CreateProcess %s\n", buf);
|
||||
PROCESS_INFORMATION pi;
|
||||
STARTUPINFOA startup;
|
||||
memset(&startup, 0, sizeof(startup));
|
||||
STARTUPINFOA startup{};
|
||||
startup.cb = sizeof(startup);
|
||||
startup.dwFlags = STARTF_USESTDHANDLES;
|
||||
startup.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
|
@ -452,9 +452,21 @@ pid_type async_run(char const* cmdline)
|
|||
if (ret == 0)
|
||||
{
|
||||
int const error = GetLastError();
|
||||
std::printf("failed (%d) %s\n", error, error_code(error, system_category()).message().c_str());
|
||||
std::printf("ERROR: (%d) %s\n", error, error_code(error, system_category()).message().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD len = sizeof(buf);
|
||||
if (QueryFullProcessImageNameA(pi.hProcess, PROCESS_NAME_NATIVE, buf, &len) == 0)
|
||||
{
|
||||
int const error = GetLastError();
|
||||
std::printf("ERROR: QueryFullProcessImageName (%d) %s\n", error
|
||||
, error_code(error, system_category()).message().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
std::printf("launched: %s\n", buf);
|
||||
}
|
||||
return pi.dwProcessId;
|
||||
#else
|
||||
pid_type p;
|
||||
|
@ -478,7 +490,7 @@ pid_type async_run(char const* cmdline)
|
|||
int ret = posix_spawnp(&p, argv[0], nullptr, nullptr, &argv[0], nullptr);
|
||||
if (ret != 0)
|
||||
{
|
||||
std::printf("failed (%d) %s\n", errno, strerror(errno));
|
||||
std::printf("ERROR (%d) %s\n", errno, strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
return p;
|
||||
|
|
|
@ -277,6 +277,7 @@ class SocksHandler(StreamRequestHandler):
|
|||
if __name__ == '__main__':
|
||||
|
||||
debug('starting socks.py %s' % " ".join(sys.argv))
|
||||
debug('python version: %s' % sys.version_info.__str__())
|
||||
listen_port = 8002
|
||||
i = 1
|
||||
while i < len(sys.argv):
|
||||
|
|
|
@ -5,6 +5,7 @@ import os
|
|||
import ssl
|
||||
import gzip
|
||||
import base64
|
||||
import socket
|
||||
|
||||
# Python 3 has moved {Simple,Base}HTTPServer to http module
|
||||
try:
|
||||
|
@ -165,11 +166,8 @@ class http_handler(BaseHTTPRequestHandler):
|
|||
s.send_header('Content-Encoding', 'gzip')
|
||||
if not keepalive:
|
||||
s.send_header("Connection", "close")
|
||||
try:
|
||||
s.request.shutdown()
|
||||
except Exception as e:
|
||||
print('Failed to shutdown read-channel of socket: ', e)
|
||||
sys.stdout.flush()
|
||||
if not use_ssl:
|
||||
s.request.shutdown(socket.SHUT_RD)
|
||||
|
||||
s.end_headers()
|
||||
|
||||
|
@ -204,6 +202,7 @@ if __name__ == '__main__':
|
|||
use_ssl = sys.argv[3] != '0'
|
||||
keepalive = sys.argv[4] != '0'
|
||||
min_interval = sys.argv[5]
|
||||
print('python version: %s' % sys.version_info.__str__())
|
||||
|
||||
http_handler.protocol_version = 'HTTP/1.1'
|
||||
httpd = http_server_with_timeout(('127.0.0.1', port), http_handler)
|
||||
|
|
|
@ -25,6 +25,8 @@ rule link_libtorrent ( properties * )
|
|||
return $(result) ;
|
||||
}
|
||||
|
||||
variant debug-mode : debug : <asserts>on <debug-iterators>on <invariant-checks>full ;
|
||||
|
||||
project tools
|
||||
: requirements
|
||||
<threading>multi
|
||||
|
@ -36,6 +38,7 @@ project tools
|
|||
<conditional>@link_libtorrent
|
||||
: default-build
|
||||
<link>static
|
||||
<variant>debug-mode
|
||||
;
|
||||
|
||||
exe dht : dht_put.cpp : <include>../ed25519/src ;
|
||||
|
|
Loading…
Reference in New Issue