diff options
author | David Robillard <d@drobilla.net> | 2009-10-23 17:30:11 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-23 17:30:11 +0000 |
commit | 8340dcdd57ec32c9a5b59e2058740d5607f95521 (patch) | |
tree | 6f37c0f70985d4e75a3bb0d16cc516dfc307c397 /libs/evoral/run-tests.sh | |
parent | 49a6e300c38b4f4aad69177e023812bef8fda4b5 (diff) |
Unit test code coverage using lcov.
git-svn-id: svn://localhost/ardour2/branches/3.0@5892 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral/run-tests.sh')
-rwxr-xr-x | libs/evoral/run-tests.sh | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/libs/evoral/run-tests.sh b/libs/evoral/run-tests.sh index de2e4005f9..64c36a8fec 100755 --- a/libs/evoral/run-tests.sh +++ b/libs/evoral/run-tests.sh @@ -1,8 +1,29 @@ #!/bin/sh export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../../build/default/libs/evoral -if test -f ./test/testdata/TakeFive.mid -then - ../../build/default/libs/evoral/run-tests -else - echo "This script must be run from within the libs/evoral directory" +if [ ! -f './test/testdata/TakeFive.mid' ]; then + echo "This script must be run from within the libs/evoral directory"; + exit 1; fi + +srcdir=`pwd` + +# Make symlink to TakeFive.mid in build directory +cd ../../build/default/libs/evoral +mkdir -p ./test/testdata +ln -fs $srcdir/test/testdata/TakeFive.mid \ + ./test/testdata/TakeFive.mid + +lcov -d ./src -z +./run-tests +lcov -d ./src -d ./test -b ../../.. -c > coverage.lcov +lcov -r coverage.lcov *boost* *c++* *usr/include* -o coverage.lcov +mkdir -p ./coverage +genhtml -o coverage coverage.lcov +#rm -r coverage/boost +#rm -r coverage/usr +#rm -r coverage/c++ +#rm -r coverage/cppunit +#rm -r coverage/glibmm-2.4 +#rm -r coverage/sigc++-2.0 +echo "Report written to:" +echo "../../build/default/libs/evoral/coverage/index.html" |