coverage.sh 321 B

12345678910111213141516
  1. #!/bin/sh
  2. set -e
  3. objdir=$1
  4. suffix=$2
  5. shift 2
  6. objs=$@
  7. gcov -b -p -f -o "${objdir}" ${objs}
  8. # Move gcov outputs so that subsequent gcov invocations won't clobber results
  9. # for the same sources with different compilation flags.
  10. for f in `find . -maxdepth 1 -type f -name '*.gcov'` ; do
  11. mv "${f}" "${f}.${suffix}"
  12. done