run.sh 621 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env bash
  2. composer install
  3. # avoid port collision on jenkins - use $EXECUTOR_NUMBER
  4. if [ -z "$EXECUTOR_NUMBER" ]; then
  5. EXECUTOR_NUMBER=0
  6. fi
  7. PORT=$((8080 + $EXECUTOR_NUMBER))
  8. echo $PORT
  9. php -S localhost:$PORT -t ../.. &
  10. PHPPID=$!
  11. echo $PHPPID
  12. PORT_FED=$((8180 + $EXECUTOR_NUMBER))
  13. echo $PORT_FED
  14. php -S localhost:$PORT_FED -t ../.. &
  15. PHPPID_FED=$!
  16. echo $PHPPID_FED
  17. export TEST_SERVER_URL="http://localhost:$PORT/ocs/"
  18. export TEST_SERVER_FED_URL="http://localhost:$PORT_FED/ocs/"
  19. vendor/bin/behat -f junit -f pretty
  20. RESULT=$?
  21. kill $PHPPID
  22. kill $PHPPID_FED
  23. tail "../../data/owncloud.log"
  24. exit $RESULT