add possibility to create combined coverage
Define the environment variable LTC_COVERAGE to something, run testme.sh with all the coverage compile time options enabled and then 'make lcov' creates the combined coverage for all combinations of compile-time options handled in testme.sh. e.g. LTC_COVERAGE=1 ./testme.sh "makefile -j3" "-DUSE_LTM -DLTM_DESC -I../libtommath -fprofile-arcs -ftest-coverage" "../libtommath/libtommath.a -lgcov"
This commit is contained in:
parent
21ed315527
commit
7db5760c91
3
.gitignore
vendored
3
.gitignore
vendored
@ -57,6 +57,9 @@ timing.exe
|
|||||||
*.gcno
|
*.gcno
|
||||||
*.gcov
|
*.gcov
|
||||||
|
|
||||||
|
coverage/
|
||||||
|
coverage*.info
|
||||||
|
|
||||||
# coverity intermediate directory etc.
|
# coverity intermediate directory etc.
|
||||||
cov-int/
|
cov-int/
|
||||||
.coverity_*
|
.coverity_*
|
||||||
|
5
build.sh
5
build.sh
@ -24,7 +24,12 @@ if [ -a test ] && [ -f test ] && [ -x test ]; then
|
|||||||
for f in *_tv.txt; do if (diff -i -w -B $f notes/$f) then true; else (echo "tv_gen $f failed" && rm -f testok.txt && exit 1); fi; done
|
for f in *_tv.txt; do if (diff -i -w -B $f notes/$f) then true; else (echo "tv_gen $f failed" && rm -f testok.txt && exit 1); fi; done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
lcov_opts="--capture --no-external --directory src -q"
|
||||||
|
lcov_out=$(echo coverage_$1_$2_$3 | tr ' -=+' '_')".info"
|
||||||
|
|
||||||
if [ -a testok.txt ] && [ -f testok.txt ]; then
|
if [ -a testok.txt ] && [ -f testok.txt ]; then
|
||||||
|
[ "$LTC_COVERAGE" != "" ] && lcov $lcov_opts --output-file $lcov_out
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
exit 1
|
exit 1
|
||||||
|
3
makefile
3
makefile
@ -275,6 +275,9 @@ profile:
|
|||||||
rm -f timing `find . -type f | grep [.][ao] | xargs`
|
rm -f timing `find . -type f | grep [.][ao] | xargs`
|
||||||
CFLAGS="$(CFLAGS) -fprofile-use" $(MAKE) timing EXTRALIBS="$(EXTRALIBS) -lgcov"
|
CFLAGS="$(CFLAGS) -fprofile-use" $(MAKE) timing EXTRALIBS="$(EXTRALIBS) -lgcov"
|
||||||
|
|
||||||
|
lcov:
|
||||||
|
lcov `find -name 'coverage_*.info' -exec echo -n " -a {}" \;` -o coverage.info -q 2>/dev/null
|
||||||
|
genhtml coverage.info --output-directory coverage -q
|
||||||
|
|
||||||
#This rule cleans the source tree of all compiled code, not including the pdf
|
#This rule cleans the source tree of all compiled code, not including the pdf
|
||||||
#documentation.
|
#documentation.
|
||||||
|
Loading…
Reference in New Issue
Block a user