diff --git a/.travis.yml b/.travis.yml index 9280c68dc..6936b6603 100644 --- a/.travis.yml +++ b/.travis.yml @@ -85,27 +85,27 @@ script: - cd .. - cd test - - bjam --hash -j3 warnings-as-errors=on variant=$variant -l900 $coverage_toolset $target + - bjam --hash -j3 warnings-as-errors=on invariant-checks=full variant=$variant -l900 $coverage_toolset $target # if we're building with code coverage, report it as soon as possible - if [[ $TRAVIS_OS_NAME == "linux" && $coverage == "1" ]]; then codecov --root .. --gcov-exec gcov-4.8; fi - cd ../examples - - bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset link=shared + - bjam --hash -j3 warnings-as-errors=on debug-iterators=on picker-debugging=on invariant-checks=full variant=$variant $coverage_toolset link=shared - if [[ $lang == "cpp11" ]]; then - bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset link=shared bt-get bt-get2; + bjam --hash -j3 warnings-as-errors=on debug-iterators=on picker-debugging=on invariant-checks=full variant=$variant $coverage_toolset link=shared bt-get bt-get2; fi - cd .. # build libtorrent separately and install it in a temporary (well known) dir # we have to do this because on linux the name of the python module is the same # as the main library, so we can't stage them to the same directory - - bjam --hash -j3 warnings-as-errors=on link=shared variant=$variant $toolset install location=./lib + - bjam --hash -j3 warnings-as-errors=on link=shared debug-iterators=on picker-debugging=on invariant-checks=full variant=$variant $coverage_toolset install location=./lib - cd bindings/python # here we specify the temporary lib dir as a path to look for the main library - - bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset stage_module libtorrent-link=shared install-type=LIB dll-path=../../lib + - bjam --hash -j3 warnings-as-errors=on debug-iterators=on picker-debugging=on invariant-checks=full variant=$variant $coverage_toolset stage_module libtorrent-link=shared install-type=LIB dll-path=../../lib - LD_LIBRARY_PATH=../../lib DYLD_LIBRARY_PATH=../../lib python test.py - cd ../.. diff --git a/appveyor.yml b/appveyor.yml index 760ed7577..b887e78b2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,16 +7,11 @@ os: Visual Studio 2015 clone_depth: 1 environment: matrix: -# - variant: test_debug -# compiler: msvc-14.0 -# sim: 1 -# linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2015\\lib"' -# include: '"c:\\openssl-1.0.1p-vs2015\\include"' - variant: test_debug - compiler: msvc-12.0 + compiler: msvc-14.0 sim: 1 - linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2013\\lib"' - include: '"c:\\openssl-1.0.1p-vs2013\\include"' + linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2015\\lib"' + include: '"c:\\openssl-1.0.1p-vs2015\\include"' - variant: test_debug compiler: msvc-12.0 x64: 1 @@ -96,6 +91,7 @@ install: - echo %BOOST_BUILD_PATH% - set PATH=%PATH%;%BOOST_BUILD_PATH%\src\engine\bin.ntx86 - 'echo using msvc : 10.0 ; >%HOMEDRIVE%%HOMEPATH%/user-config.jam' +- 'echo using msvc : 14.0 ; >>%HOMEDRIVE%%HOMEPATH%/user-config.jam' - 'echo using msvc : 12.0 ; >>%HOMEDRIVE%%HOMEPATH%/user-config.jam' - 'echo using msvc : 9.0 ; >>%HOMEDRIVE%%HOMEPATH%/user-config.jam' - type %HOMEDRIVE%%HOMEPATH%\user-config.jam @@ -116,10 +112,11 @@ cache: build_script: - if not defined x64 ( cd %ROOT_DIRECTORY%\examples - & b2.exe --hash -j2 %compiler% variant=%variant% linkflags=%linkflags% include=%include% link=shared - & if %compiler% == msvc-14.0 ( b2.exe --hash -j2 %compiler% variant=%variant% linkflags=%linkflags% include=%include% link=shared bt-get bt-get2 ) - & cd %ROOT_DIRECTORY%\examples - & b2.exe --hash -j2 %compiler% variant=%variant% linkflags=%linkflags% include=%include% link=shared + & if %compiler% == msvc-14.0 ( + b2.exe --hash -j2 address-model=32 %compiler% variant=%variant% debug-iterators=on picker-debugging=on invariant-checks=full linkflags=%linkflags% include=%include% link=shared bt-get bt-get2 + ) else ( + b2.exe --hash -j2 address-model=32 %compiler% variant=%variant% debug-iterators=on picker-debugging=on invariant-checks=full linkflags=%linkflags% include=%include% link=shared + ) & cd %ROOT_DIRECTORY%\bindings\python & b2.exe --hash -j2 %compiler% stage_module install-dependencies=on variant=%variant% libtorrent-link=shared linkflags=%linkflags% include=%include% & python test.py diff --git a/bindings/python/test.py b/bindings/python/test.py index 7c97cf54a..48c5a0f2a 100644 --- a/bindings/python/test.py +++ b/bindings/python/test.py @@ -61,7 +61,7 @@ class test_torrent_info(unittest.TestCase): print f.path self.assertEqual(os.path.split(f.path)[1], expected[idx]) - self.assertEqual(os.path.split(f.path)[0], 'temp/foo') + self.assertEqual(os.path.split(os.path.split(f.path)[0]), ('temp', 'foo')) idx += 1 class test_alerts(unittest.TestCase): diff --git a/simulation/Jamfile b/simulation/Jamfile index 21922a16c..d9f6a45ac 100644 --- a/simulation/Jamfile +++ b/simulation/Jamfile @@ -10,7 +10,8 @@ use-project /libsimulator : libsimulator ; project : requirements on - /torrent//torrent/on + on + /torrent//torrent /libtorrent_test//libtorrent_test setup_swarm.cpp setup_dht.cpp diff --git a/simulation/libsimulator b/simulation/libsimulator index f0e42435d..c19b35e05 160000 --- a/simulation/libsimulator +++ b/simulation/libsimulator @@ -1 +1 @@ -Subproject commit f0e42435dce3ff227cc81b17ccab143b21d8f771 +Subproject commit c19b35e05831ad46cefd1a9e9f8b022c799bc8d0 diff --git a/test/Jamfile b/test/Jamfile index 819b19561..8bbdb4b75 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -16,38 +16,6 @@ explicit test_natpmp ; explicit enum_if ; explicit bdecode_benchmark ; -rule link_test ( properties * ) -{ - local result ; - if shared in $(properties) - { - result += - libtorrent_test/shared ; - } - else - { - result += - libtorrent_test/static ; - } - return $(result) ; -} - -rule link_libtorrent ( properties * ) -{ - local result ; - if shared in $(properties) - { - result += - /torrent//torrent/shared/shared/on ; - } - else - { - result += - /torrent//torrent/static/static/on ; - } - return $(result) ; -} - lib libtorrent_test : # sources main.cpp @@ -71,7 +39,8 @@ lib libtorrent_test shared:ED25519_BUILD_DLL ../ed25519/src windows:advapi32 - @link_libtorrent + /torrent//torrent + on darwin:-Wno-unused-command-line-argument : # default build @@ -88,8 +57,9 @@ lib advapi32 : : Advapi32 ; project : requirements - @link_test - @link_libtorrent + on + libtorrent_test + /torrent//torrent darwin:-Wno-unused-command-line-argument : default-build multi