Shidongan

Debug test

Nov 22nd, 2020
400
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #   USAGE
  3. #   To use script you have to specify
  4. #     -h: (Required) IPv4 host for xdebug to response
  5. #     -t: (Optional) Test's path from content root
  6. #   sh debug_test.sh -h 10.92.92.93 -t sample_path
  7. while [ "$1" != "" ]; do
  8.     case $1 in
  9.         -h ) shift
  10.              REMOTE_HOST=$1
  11.              ;;
  12.         -t ) shift
  13.              TEST=$1
  14.              ;;
  15.     esac
  16.     shift
  17. done
  18. if [ "$REMOTE_HOST" = "" ]; then
  19.   echo "Host (-h) missing"
  20.   exit 1
  21. fi
  22. php -dxdebug.remote_enable=1 -dxdebug.remote_autostart=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9001 -dxdebug.remote_host=$REMOTE_HOST -dxdebug.IDE_key=PHPSTORM vendor/bin/codecept run $TEST -c "/../../app/codeception.yml"
RAW Paste Data