From b480f40a981cd57f457b3b15f237ae93d61a516d Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 17 May 2015 21:00:47 +0000 Subject: [PATCH] fix linux build and update code coverage script --- include/libtorrent/kademlia/msg.hpp | 4 +++- test/main.cpp | 6 +++++- tools/test_coverage.sh | 11 ++++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/include/libtorrent/kademlia/msg.hpp b/include/libtorrent/kademlia/msg.hpp index 57db50bbb..f212cf6e6 100644 --- a/include/libtorrent/kademlia/msg.hpp +++ b/include/libtorrent/kademlia/msg.hpp @@ -35,7 +35,6 @@ POSSIBILITY OF SUCH DAMAGE. #include #include -#include "libtorrent/lazy_entry.hpp" #if BOOST_VERSION < 103500 #include #else @@ -43,6 +42,9 @@ POSSIBILITY OF SUCH DAMAGE. #endif namespace libtorrent { + +struct bdecode_node; + namespace dht { typedef std::vector packet_t; diff --git a/test/main.cpp b/test/main.cpp index 5ebf54bc4..0e1b27b97 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -59,7 +59,11 @@ void sig_handler(int sig) { char stack_text[10000]; -#if (defined TORRENT_DEBUG && !TORRENT_NO_ASSERTS) || TORRENT_RELEASE_ASSERTS +#if (defined TORRENT_DEBUG && TORRENT_USE_ASSERTS) \ + || defined TORRENT_ASIO_DEBUGGING \ + || defined TORRENT_PROFILE_CALLS \ + || defined TORRENT_RELEASE_ASSERTS \ + || defined TORRENT_DEBUG_BUFFERS print_backtrace(stack_text, sizeof(stack_text), 30); #elif defined __FUNCTION__ strcat(stack_text, __FUNCTION__); diff --git a/tools/test_coverage.sh b/tools/test_coverage.sh index 350a511de..a882369aa 100755 --- a/tools/test_coverage.sh +++ b/tools/test_coverage.sh @@ -1,7 +1,10 @@ #!/bin/bash -OBJECT_PATH=bin/gcc-4.8/debug/asserts-off/boost-source/deprecated-functions-off/export-extra-on/invariant-checks-off/link-static/logging-on/test-coverage-on/threading-multi/src +OBJECT_PATH=bin/gcc-4.8/debug/asserts-off/boost-source/deprecated-functions-off/export-extra-on/invariant-checks-off/link-static/test-coverage-on/threading-multi/src +# $1 = test_name +# $2 = filename pattern for tested source files +# $3 = optional bjam arguments function run_test { set +e rm $OBJECT_PATH/*.gcda @@ -36,8 +39,10 @@ mkdir test-coverage rm test-coverage/coverage_all set -e -run_test test_ip_voter "*ip_voter.*" -run_test test_alert_manager "*alert_manager.*" +run_test test_packet_buffer "*/packet_buffer.*" -a +run_test test_ip_voter "*/ip_voter.*" +run_test test_bitfield "*/bitfield.*" +run_test test_alert_manager "*/alert_manager.*" run_test test_dht "*/kademlia/*" run_test test_bdecode "*/bdecode.*" run_test test_piece_picker "*/piece_picker.*"