summaryrefslogtreecommitdiffstats
path: root/memory/jemalloc/src/coverage.sh
blob: 6d1362a8c1cfab89aba9d59dfd80a6bd7b80d484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

set -e

objdir=$1
suffix=$2
shift 2
objs=$@

gcov -b -p -f -o "${objdir}" ${objs}

# Move gcov outputs so that subsequent gcov invocations won't clobber results
# for the same sources with different compilation flags.
for f in `find . -maxdepth 1 -type f -name '*.gcov'` ; do
  mv "${f}" "${f}.${suffix}"
done