full-test.sh 665 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #! /usr/bin/env bash
  2. # If you're running on OS X, you probably need to rebuild
  3. # some dependencies in the docker container, before it will start.
  4. #
  5. #npm rebuild --update-binary
  6. echo ">> Starting server..."
  7. grunt --no-color forever:app:start
  8. echo ">> Waiting for Server"
  9. count=1
  10. max_wait=60
  11. while [ $count -le $max_wait ]
  12. do
  13. if nc -z localhost 3000
  14. then
  15. echo ">> Server Started"
  16. echo ">> Running acceptance tests..."
  17. grunt --no-color mochaTest:acceptance
  18. _test_exit_code=$?
  19. echo ">> Killing server"
  20. grunt --no-color forever:app:stop
  21. echo ">> Done"
  22. exit $_test_exit_code
  23. fi
  24. sleep 1
  25. echo -n "."
  26. count=$((count+1))
  27. done
  28. exit 1