.travis.script 585 B

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