coverage.sh 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash -e
  2. # continuous integration test script
  3. # run this from the top-level source directory
  4. # In Jenkins scripts like this should generally be sourced so that they
  5. # run in the jenkins controlled shell environment so that errors get noticed.
  6. # run the lcov code-coverage analysis tool
  7. LCOV_PATH=/opt/lcov/bin
  8. LCOV=${LCOV_PATH}/lcov
  9. GENHTML=${LCOV_PATH}/genhtml
  10. if [ -z "$VIDEOS" ]; then
  11. VIDEOS=/usr/local/share/videos
  12. fi
  13. cd unix && rm -Rf objs
  14. make clean
  15. CFLAGS="-g3 -fprofile-arcs -ftest-coverage -UOD_ENABLE_ASSERTIONS" make
  16. ${LCOV} -z -d `pwd` -b `pwd`
  17. ${LCOV} -c -i -b `pwd` -d `pwd` -t baseline -o baseline.info
  18. CFLAGS="-g3 -fprofile-arcs -ftest-coverage -UOD_ENABLE_ASSERTIONS" make check
  19. ${LCOV} -c -b `pwd` -d `pwd` -t check -o makecheck.info
  20. ${LCOV} -z -d `pwd` -b `pwd`
  21. rm -f out.ogv
  22. ./encoder_example -k 4 ${VIDEOS}/claire_qcif-2frames.y4m -o out.ogv
  23. ./dump_video out.ogv -o /dev/null
  24. ${LCOV} -c -b `pwd` -d `pwd` -t encoderdecoder -o encdec.info
  25. ${LCOV} -a baseline.info -a makecheck.info -a encdec.info -o daala_coverage.info
  26. ${GENHTML} -s -o coverage/ daala_coverage.info