diff options
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 25 |
1 files changed, 10 insertions, 15 deletions
@@ -54,21 +54,13 @@ cov() { fi echo "Using $gcov" - echo "Removing previous GC notes and runs" - lcov -z -d . - find -path */coverage/*.run -delete - echo "Building $@" - build $@ -q variant=coverage || return 2 - - echo "Extracting coverage data" mkdir -p $cov - lcov -d . -c -o $all --derive-func-data --no-external --rc geninfo_auto_base=1 -q --gcov-tool $gcov || return 3 - lcov --remove $all "*/bin/*" -o $key -q || return 4 + gcov=$gcov cov=$cov build testing.launcher=~/dev/util/diff.cov $@ -q variant=coverage || return 2 echo "Generating HTML" mkdir -p $html - genhtml $key -o $html -s -k -t . --demangle-cpp --sort --function-coverage -q --num-spaces=2 || return 5 + genhtml bin/*.info -o $html -s -k -t . --demangle-cpp --sort --function-coverage -q --num-spaces=2 || return 5 rsync -a --delete-after $html/ $htmlfin/ rm -rf $cov @@ -78,11 +70,14 @@ cov() { } sizes() { - find -path */release/* -type f -perm -111 -delete - build variant=release - find -path */release/* -type f -perm -111 | sort | xargs -r strip --strip-unneeded - find -path */release/* -type f -perm -111 -printf "%p\t%s\n" | sort -k1 | \ - column -N path,size -R path,size -t -s $'\t' | tee ~/new + MODE="variant=release strip=on" + TARGETS=$(build $MODE $@ -and1 | grep '^\(gcc\|clang-linux\)\.link' | cut -d ' ' -f 2) + if [[ -z $TARGETS ]] ; then return ; fi + build $MODE -d0 $@ + find $TARGETS -printf "./%p\t%s\n" | \ + sed "s|/bin/.*/\([^/]\+\s\)|\t\1|; s|^$(pwd)/||" | \ + sort -bk1,2 | \ + column -N module,binary,size -R module,binary,size -t -s $'\t' } PATH="/usr/lib/ccache/bin:$PATH" |