coverage.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. #***************************************************************************
  3. # _ _ ____ _
  4. # Project ___| | | | _ \| |
  5. # / __| | | | |_) | |
  6. # | (__| |_| | _ <| |___
  7. # \___|\___/|_| \_\_____|
  8. #
  9. # Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  10. #
  11. # This software is licensed as described in the file COPYING, which
  12. # you should have received as part of this distribution. The terms
  13. # are also available at https://curl.haxx.se/docs/copyright.html.
  14. #
  15. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  16. # copies of the Software, and permit persons to whom the Software is
  17. # furnished to do so, under the terms of the COPYING file.
  18. #
  19. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  20. # KIND, either express or implied.
  21. #
  22. ###########################################################################
  23. ./buildconf
  24. mkdir -p cvr
  25. cd cvr
  26. ../configure --disable-shared --enable-debug --enable-maintainer-mode --enable-code-coverage
  27. make -sj
  28. # the regular test run
  29. make TFLAGS=-n test-nonflaky
  30. # make all allocs/file operations fail
  31. #make TFLAGS=-n test-torture
  32. # do everything event-based
  33. make TFLAGS=-n test-event
  34. lcov -d . -c -o cov.lcov
  35. genhtml cov.lcov --output-directory coverage --title "curl code coverage"
  36. tar -cjf curl-coverage.tar.bz2 coverage