fix build without deprecated function. extend test_coverage script. comment out DHT sanity check assert that fires in the wild

This commit is contained in:
Arvid Norberg 2015-03-21 00:50:28 +00:00
parent ccc7e45406
commit 3f21a846f6
3 changed files with 7 additions and 4 deletions

View File

@ -990,7 +990,9 @@ namespace libtorrent
if (!m_mtime.empty()) m_mtime.resize(index + 1, 0);
if (!m_file_hashes.empty()) m_file_hashes.resize(index + 1, NULL);
#ifndef TORRENT_NO_DEPRECATE
if (!m_file_base.empty()) m_file_base.resize(index + 1, 0);
#endif
reorder_file(index, cur_index);
}

View File

@ -480,7 +480,7 @@ bool routing_table::add_node(node_entry e)
// harden our resistence towards this attack. Perhaps by never
// splitting a bucket (and discard nodes) if the two buckets above it
// are empty or close to empty
TORRENT_ASSERT(m_buckets.size() <= 50);
// TORRENT_ASSERT(m_buckets.size() <= 50);
if (m_buckets.size() > 50)
{
// this is a sanity check. In the wild, we shouldn't see routing

View File

@ -1,6 +1,6 @@
#!/bin/bash
OBJECT_PATH=bin/gcc-4.8/debug/asserts-off/boost-source/debug-iterators-on/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/logging-on/test-coverage-on/threading-multi/src
function run_test {
set +e
@ -10,10 +10,10 @@ function run_test {
cd test
set +e
rm -rf bin
set -e
bjam asserts=off invariant-checks=off link=static boost=source test-coverage=on picker-debugging=off -j4 $1
bjam asserts=off invariant-checks=off link=static boost=source deprecated-functions=off debug-iterators=off test-coverage=on picker-debugging=off -j4 $1
cd ..
set -e
lcov -d $OBJECT_PATH/ -c -o coverage_$1_full
lcov --extract coverage_$1_full "$2" -o coverage_$1
@ -34,6 +34,7 @@ set +e
mkdir test-coverage
set -e
run_test test_dht "*/kademlia/*"
run_test test_bdecode "*/bdecode.*"
run_test test_piece_picker "*/piece_picker.*"
run_test test_torrent_info "*/torrent_info.*"