Add qa.sh modes for library and application coverage stats

This commit is contained in:
Rhodri James 2017-01-30 15:27:54 +00:00
parent 25a40afb0c
commit 89d37b3ee3

View File

@ -45,7 +45,7 @@ main() {
local CXX="${GCC_CXX}" local CXX="${GCC_CXX}"
BASE_FLAGS+=" -g -fsanitize=address -fno-omit-frame-pointer" BASE_FLAGS+=" -g -fsanitize=address -fno-omit-frame-pointer"
;; ;;
coverage) coverage | lib-coverage | app-coverage)
local CC="${GCC_CC}" local CC="${GCC_CC}"
local CXX="${GCC_CXX}" local CXX="${GCC_CXX}"
BASE_FLAGS+=" --coverage --no-inline" BASE_FLAGS+=" --coverage --no-inline"
@ -71,7 +71,7 @@ main() {
;; ;;
*) *)
echo "Usage:" 1>&2 echo "Usage:" 1>&2
echo " ${0##*/} (address|coverage|egypt|memory|ncc|undefined)" 1>&2 echo " ${0##*/} (address|coverage|lib-coverage|app-coverage|egypt|memory|ncc|undefined)" 1>&2
exit 1 exit 1
;; ;;
esac esac
@ -104,6 +104,12 @@ main() {
coverage) coverage)
find -name '*.gcda' | sort | xargs gcov find -name '*.gcda' | sort | xargs gcov
;; ;;
lib-coverage)
find lib -name '*.gcda' | sort | xargs gcov
;;
app-coverage)
find lib xmlwf -name '*.gcda' | sort | xargs gcov
;;
egypt) egypt)
local DOT_FORMAT="${DOT_FORMAT:-svg}" local DOT_FORMAT="${DOT_FORMAT:-svg}"
local o="callgraph.${DOT_FORMAT}" local o="callgraph.${DOT_FORMAT}"