fix linux build and update code coverage script

This commit is contained in:
Arvid Norberg 2015-05-17 21:00:47 +00:00
parent 88fe6eba9c
commit b480f40a98
3 changed files with 16 additions and 5 deletions

View File

@ -35,7 +35,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include <string>
#include <libtorrent/kademlia/node_id.hpp>
#include "libtorrent/lazy_entry.hpp"
#if BOOST_VERSION < 103500
#include <asio/ip/udp.hpp>
#else
@ -43,6 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
#endif
namespace libtorrent {
struct bdecode_node;
namespace dht {
typedef std::vector<char> packet_t;

View File

@ -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__);

View File

@ -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.*"