Drupal investigation

run-tests.sh 769B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. set -e
  3. start_browser_api(){
  4. CURRENT_DIR=$(pwd)
  5. LOCAL_PHANTOMJS="${CURRENT_DIR}/bin/phantomjs"
  6. if [ -f ${LOCAL_PHANTOMJS} ]; then
  7. ${LOCAL_PHANTOMJS} --ssl-protocol=any --ignore-ssl-errors=true src/Client/main.js 8510 1024 768 2>&1 &
  8. else
  9. phantomjs --ssl-protocol=any --ignore-ssl-errors=true src/Client/main.js 8510 1024 768 2>&1 >> /dev/null &
  10. fi
  11. sleep 2
  12. }
  13. stop_services(){
  14. ps axo pid,command | grep phantomjs | grep -v grep | awk '{print $1}' | xargs -I {} kill {}
  15. ps axo pid,command | grep php | grep -v grep | grep -v phpstorm | awk '{print $1}' | xargs -I {} kill {}
  16. sleep 2
  17. }
  18. mkdir -p /tmp/jcalderonzumba/phantomjs
  19. stop_services
  20. start_browser_api
  21. CURRENT_DIR=$(pwd)
  22. ${CURRENT_DIR}/bin/phpunit --configuration unit_tests.xml