add script to run some unit tests with code coverage
This commit is contained in:
parent
72d015c86a
commit
48b6eb1798
@ -1,11 +1,41 @@
|
|||||||
#!/bin/sh
|
#!/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
|
||||||
|
|
||||||
|
function run_test {
|
||||||
|
rm $OBJECT_PATH/*.gcda
|
||||||
|
|
||||||
|
cd test
|
||||||
|
rm -rf bin
|
||||||
|
bjam asserts=off invariant-checks=off link=static boost=source test-coverage=on picker-debugging=off -j4 $1
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
lcov -d $OBJECT_PATH/ -c -o coverage_$1_full
|
||||||
|
lcov --extract coverage_$1_full "$2" -o coverage_$1
|
||||||
|
rm -rf $1_coverage
|
||||||
|
genhtml -o $1_coverage -t $1 --num-spaces 4 coverage_$1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# force rebuilding and rerunning the unit tests
|
||||||
cd test
|
cd test
|
||||||
bjam asserts=off invariant-checks=off link=static boost=source test-coverage=on picker-debugging=off -j4
|
rm -rf bin
|
||||||
cd ..
|
cd ..
|
||||||
lcov --zerocounters -q
|
|
||||||
lcov -d bin/gcc-4.8/debug/asserts-off/boost-source/debug-iterators-on/export-extra-on/invariant-checks-off/link-static/logging-on/picker-debugging-off/test-coverage-on/threading-multi/src/ -c -o coverage
|
run_test test_piece_picker "*/piece_picker.*"
|
||||||
lcov --remove coverage "/usr*" -o coverage
|
run_test test_torrent_info "*/torrent_info.*"
|
||||||
lcov --remove coverage "*/boost/*" -o coverage
|
run_test test_part_file "*/part_file.*"
|
||||||
genhtml -o test_coverage -t "libtorrent test coverage" --num-spaces 4 coverage
|
run_test test_http_parser "*/http_parser.*"
|
||||||
|
run_test test_ip_filter "*/ip_filter.*"
|
||||||
|
run_test test_utp "*/utp_stream.*"
|
||||||
|
run_test test_peer_list "*/peer_list.*"
|
||||||
|
run_test test_gzip "*/gzip.cpp"
|
||||||
|
run_test test_file_storage "*/file_storage.*"
|
||||||
|
run_test test_storage "*/storage.*"
|
||||||
|
run_test test_xml "*/xml_parse.*"
|
||||||
|
run_test test_sliding_average "*/sliding_average.*"
|
||||||
|
run_test test_string "*/escape_string.*"
|
||||||
|
run_test test_utf8 "*/ConvertUTF.*"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user