File: run_gcov.sh

package info (click to toggle)
openexr 3.1.13-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 37,616 kB
  • sloc: cpp: 186,653; ansic: 24,266; sh: 173; python: 68; makefile: 23
file content (17 lines) | stat: -rwxr-xr-x 407 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
!/usr/bin/env bash

set -ex

mkdir _coverage
cd _coverage

# The sed command below converts from:
#   ../_build/src/OpenEXR/CMakeFiles/OpenColorIO.dir/ops/Exponent.gcno
# to:
#   ../src/OpenEXR/ops/Exponent.cpp

for g in $(find ../_build -name "*.gcno" -type f); do
    gcov -l -p -o $(dirname "$g") $(echo "$g" | sed -e 's/\/_build\//\//' -e 's/\.gcno/\.cpp/' -e 's/\/CMakeFiles.*\.dir\//\//')
done

cd ..