I2C toy code
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

52 lignes
1.1 KiB

  1. #!/bin/bash
  2. set -e
  3. if [ "$TRAVIS_CI" == "private" ]; then
  4. exit 0
  5. fi
  6. if [ "$#" != "5" ]; then
  7. echo "Usage is: ${0} \"coverage\" \"<prepend CFLAGS>\" \"<makefile>\" \"<append CFLAGS>\" <math library to link to>"
  8. echo "CC=gcc ${0} \"coverage\" \" \" \"makefile\" \"-DUSE_LTM -DLTM_DESC -I../libtommath\" ../libtommath/libtommath.a"
  9. exit -1
  10. fi
  11. if [ -z "$(echo $CC | grep "gcc")" ]; then
  12. echo "no gcc detected, early exit success"
  13. exit 0
  14. fi
  15. if [ "$(echo $3 | grep -v 'makefile[.]')" == "" ]; then
  16. echo "only run $0 for the regular makefile, early exit success"
  17. exit 0
  18. fi
  19. # output version
  20. bash printinfo.sh
  21. bash build.sh " $1" " $2" " $3 COVERAGE=1" "$4" "$5"
  22. if [ -a testok.txt ] && [ -f testok.txt ]; then
  23. echo
  24. else
  25. echo
  26. echo "Test failed"
  27. exit 1
  28. fi
  29. ./coverage_more.sh > test_coverage_more.txt || { rm -f testok.txt && exit 1 ; }
  30. make lcov-single
  31. # if this was executed as './coverage.sh ...' create coverage locally
  32. if [[ "${0%% *}" == "./${0##*/}" ]]; then
  33. make lcov-html
  34. else
  35. coveralls-lcov coverage.info
  36. fi
  37. exit 0
  38. # ref: $Format:%D$
  39. # git commit: $Format:%H$
  40. # commit time: $Format:%ai$