script 764 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash -ex
  2. findexe() {
  3. while [ ${#} -gt 0 ]; do
  4. while read -r -d: path; do
  5. [ -f "${path}/${1}" ] \
  6. && [ -x "${path}/${1}" ] \
  7. && echo "${path}/${1}" && return 0
  8. done <<< "${PATH}:"
  9. shift
  10. done
  11. return 1
  12. }
  13. LC_ALL=$(locale -a | grep -i '^en_US\.utf') \
  14. || LC_ALL=$(locale -a | grep -i '^c\.utf')
  15. export LC_ALL
  16. mkdir build
  17. cd build
  18. export CFLAGS="-g -coverage"
  19. if ! meson ..; then
  20. cat meson-logs/meson-log.txt >&2
  21. exit 1
  22. fi
  23. ninja=$(findexe ninja ninja-build)
  24. "${ninja}" test
  25. bash <(curl -s https://codecov.io/bash) 2>&1 \
  26. | grep -E -v "has arcs (to entry|from exit) block"
  27. # vim: set ts=8 shiftwidth=4 softtabstop=4 expandtab smarttab colorcolumn=80: