- #!/usr/bin/ksh93
- #
- # drcovlog_genhtml.ksh - run genhtml for drcov
- #
- # Usage:
- # $ drmemory -coverage -light -batch -- "$(cygpath -w /sbin/nfs_mount)"
- # $ drcovlog_genhtml.ksh 'C:\Users\roland_mainz\AppData\Roaming\Dr. Memory\DrMemory-nfs_mount.exe.6288.000\drcov.nfs_mount.exe.06288.0000.proc.log'
- #
- function covwinpaths2cygwinpaths
- {
- set -o nounset
- typeset i
- typeset winpath
- typeset cygwinpath
- while read -r i ; do
- if [[ "$i" == ~(El)SF: ]] ; then
- winpath="${i#SF:}"
- cygwinpath="${ cygpath -u "$winpath"; }"
- printf 'SF:%s\n' "$cygwinpath"
- else
- printf '%s\n' "$i"
- fi
- done
- return 0
- }
- function main
- {
- set -o errexit
- set -o xtrace
- which -a drcov2lcov || return 1
- which -a genhtml || return 1
- drcov2lcov -input "$1" -output 'coverage_winpaths.info'
- covwinpaths2cygwinpaths <'coverage_winpaths.info' >'coverage_cygwinpaths.info'
- rm -Rf coverage_*.info report/
- mkdir report
- (
- cd report &&
- genhtml -ignore-errors source \
- --frames \
- --function-coverage \
- --branch-coverage \
- '../coverage_cygwinpaths.info')
- rm 'coverage_winpaths.info'
- rm 'coverage_cygwinpaths.info'
- return 0
- }
- #
- # main
- #
- PATH+=':/cygdrive/c/Program Files (x86)/Dr. Memory/dynamorio/tools/bin64/'
- PATH+=":$PWD"
- builtin mkdir
- main "$@"
- # EOF.
drcovlog_genhtml.ksh - run genhtml for drcov
Posted by Anonymous on Fri 27th Sep 2024 11:07
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.