forked from premiere/premiere-libtorrent
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:
parent
ccc7e45406
commit
3f21a846f6
|
@ -990,7 +990,9 @@ namespace libtorrent
|
||||||
|
|
||||||
if (!m_mtime.empty()) m_mtime.resize(index + 1, 0);
|
if (!m_mtime.empty()) m_mtime.resize(index + 1, 0);
|
||||||
if (!m_file_hashes.empty()) m_file_hashes.resize(index + 1, NULL);
|
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);
|
if (!m_file_base.empty()) m_file_base.resize(index + 1, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
reorder_file(index, cur_index);
|
reorder_file(index, cur_index);
|
||||||
}
|
}
|
||||||
|
|
|
@ -480,7 +480,7 @@ bool routing_table::add_node(node_entry e)
|
||||||
// harden our resistence towards this attack. Perhaps by never
|
// harden our resistence towards this attack. Perhaps by never
|
||||||
// splitting a bucket (and discard nodes) if the two buckets above it
|
// splitting a bucket (and discard nodes) if the two buckets above it
|
||||||
// are empty or close to empty
|
// are empty or close to empty
|
||||||
TORRENT_ASSERT(m_buckets.size() <= 50);
|
// TORRENT_ASSERT(m_buckets.size() <= 50);
|
||||||
if (m_buckets.size() > 50)
|
if (m_buckets.size() > 50)
|
||||||
{
|
{
|
||||||
// this is a sanity check. In the wild, we shouldn't see routing
|
// this is a sanity check. In the wild, we shouldn't see routing
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/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 {
|
function run_test {
|
||||||
set +e
|
set +e
|
||||||
|
@ -10,10 +10,10 @@ function run_test {
|
||||||
cd test
|
cd test
|
||||||
set +e
|
set +e
|
||||||
rm -rf bin
|
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 ..
|
cd ..
|
||||||
|
set -e
|
||||||
|
|
||||||
lcov -d $OBJECT_PATH/ -c -o coverage_$1_full
|
lcov -d $OBJECT_PATH/ -c -o coverage_$1_full
|
||||||
lcov --extract coverage_$1_full "$2" -o coverage_$1
|
lcov --extract coverage_$1_full "$2" -o coverage_$1
|
||||||
|
@ -34,6 +34,7 @@ set +e
|
||||||
mkdir test-coverage
|
mkdir test-coverage
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
run_test test_dht "*/kademlia/*"
|
||||||
run_test test_bdecode "*/bdecode.*"
|
run_test test_bdecode "*/bdecode.*"
|
||||||
run_test test_piece_picker "*/piece_picker.*"
|
run_test test_piece_picker "*/piece_picker.*"
|
||||||
run_test test_torrent_info "*/torrent_info.*"
|
run_test test_torrent_info "*/torrent_info.*"
|
||||||
|
|
Loading…
Reference in New Issue