Fuel orchestrator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

run_tests.sh 830B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. # astute_rspec_check.sh
  3. # RVM
  4. set -e
  5. ROOT_WORKSPACE=$(cd `dirname $0` && pwd -P)
  6. function license_check() {
  7. # License information must be in every source file
  8. cd $ROOT_WORKSPACE
  9. tmpfile=`mktemp -t _fuel-astute_.XXXXXXX`
  10. find * -not -path "docs/*" -regex ".*\.\(rb\)" -type f -print0 | xargs -0 grep -Li License > $tmpfile
  11. files_with_no_license=`wc -l $tmpfile | awk '{print $1}'`
  12. if [ $files_with_no_license -gt 0 ]; then
  13. echo "ERROR: Found files without license, see files below:"
  14. cat $tmpfile
  15. rm -f $tmpfile
  16. exit 1
  17. fi
  18. rm -f $tmpfile
  19. }
  20. function ruby_checks() {
  21. cd $ROOT_WORKSPACE
  22. # Install all ruby dependencies (expect ruby version manager: RVM, rbenv or similar)
  23. bundle install
  24. # Run unit rspec tests
  25. bundle exec rake spec:unit S=$1
  26. }
  27. license_check
  28. ruby_checks $@