coverage.sh 1.0 KB

1234567891011121314151617181920212223242526272829
  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. VIDEOS=/usr/local/share/videos
  11. cd unix && rm -Rf objs
  12. make clean
  13. CFLAGS="-g3 -fprofile-arcs -ftest-coverage -UOD_ENABLE_ASSERTIONS" make
  14. ${LCOV} -z -d `pwd` -b `pwd`
  15. ${LCOV} -c -i -b `pwd` -d `pwd` -t baseline -o baseline.info
  16. CFLAGS="-g3 -fprofile-arcs -ftest-coverage -UOD_ENABLE_ASSERTIONS" make check
  17. ${LCOV} -c -b `pwd` -d `pwd` -t check -o makecheck.info
  18. ${LCOV} -z -d `pwd` -b `pwd`
  19. rm -f out.ogv
  20. ./encoder_example -k 4 ${VIDEOS}/claire_qcif-2frames.y4m -o out.ogv
  21. ./dump_video out.ogv -o /dev/null
  22. ${LCOV} -c -b `pwd` -d `pwd` -t encoderdecoder -o encdec.info
  23. ${LCOV} -a baseline.info -a makecheck.info -a encdec.info -o daala_coverage.info
  24. ${GENHTML} -s -o coverage/ daala_coverage.info