Changeset 599 for trunk/tests/run_tests.sh
- Timestamp:
- Apr 27, 2017 2:57:13 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/run_tests.sh
r541 r599 8 8 # export DB_PASS="..." 9 9 10 function err { 11 MSG="$1"; 12 IFS=''; 13 echo -e $MSG 1>&2 14 exit 1; 15 } 16 10 17 # Be in the directory with all the tests. 11 18 cd `dirname $0`; … … 15 22 echo "MySQL test DB credential environment variables are missing.\nSet these in ~/.bash_profile to avoid seeing these prompts each time."; 16 23 fi 17 for E in DB_ USER DB_PASS DB_NAME; do24 for E in DB_SERVER DB_NAME DB_USER DB_PASS; do 18 25 while [[ -z ${!E} ]]; do 19 26 read -p "$E: " $E; … … 23 30 24 31 # Create database. 25 mysql -e 'CREATE DATABASE IF NOT EXISTS `test`';32 mysql -e "CREATE DATABASE IF NOT EXISTS \`${DB_NAME}\`" || err "Failed to create database '${DB_NAME}"; 26 33 27 34 # Go! … … 31 38 # Config options go in phpunit.xml 32 39 # phpunit --tap | grep -v '^ok ' 33 phpunit --stderr || echo "Something went wrong (if there is no output above, check the php_error_log)"; 40 phpunit --stderr --colors --debug || err "\nSomething went wrong (code $?). If there is no output above, check the php_error_log"; 41
Note: See TracChangeset
for help on using the changeset viewer.