Skip to content

Instantly share code, notes, and snippets.

@matgargano
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matgargano/8854268 to your computer and use it in GitHub Desktop.
Save matgargano/8854268 to your computer and use it in GitHub Desktop.
matthews-mbp-2:bin mat$ ./install-wp-tests.sh test test test localhost latest
+ install_wp
+ mkdir -p /tmp/wordpress/
+ '[' latest == latest ']'
+ local ARCHIVE_NAME=latest
+ wget -nv -O /tmp/wordpress.tar.gz http://wordpress.org/latest.tar.gz
2014-02-06 18:04:20 URL:http://wordpress.org/latest.tar.gz [5869727/5869727] -> "/tmp/wordpress.tar.gz" [1]
+ tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C /tmp/wordpress/
+ wget -nv -O /tmp/wordpress//wp-content/db.php https://raw.github.com/markoheijnen/wp-mysqli/master/db.php
2014-02-06 18:04:22 URL:https://raw.github.com/markoheijnen/wp-mysqli/master/db.php [10499/10499] -> "/tmp/wordpress//wp-content/db.php" [1]
+ install_test_suite
++ uname -s
+ [[ Darwin == \D\a\r\w\i\n ]]
+ local 'ioption=-i ""'
+ mkdir -p /tmp/wordpress-tests-lib
+ cd /tmp/wordpress-tests-lib
+ svn co --quiet http://develop.svn.wordpress.org/trunk/tests/phpunit/includes/
+ wget -nv -O wp-tests-config.php http://develop.svn.wordpress.org/trunk/wp-tests-config-sample.php
2014-02-06 18:04:23 URL:http://develop.svn.wordpress.org/trunk/wp-tests-config-sample.php [1374/1374] -> "wp-tests-config.php" [1]
+ sed -i '""' 's:dirname( __FILE__ ) . '\''/src/'\'':'\''/tmp/wordpress/'\'':' wp-tests-config.php
+ sed -i '""' s/youremptytestdbnamehere/unittest/ wp-tests-config.php
+ sed -i '""' s/yourusernamehere/unittest/ wp-tests-config.php
+ sed -i '""' s/yourpasswordhere/unittest/ wp-tests-config.php
+ sed -i '""' 's|localhost|localhost|' wp-tests-config.php
+ install_db
+ PARTS=(${DB_HOST//\:/ })
+ local PARTS
+ local DB_HOSTNAME=localhost
+ local DB_SOCK_OR_PORT=
+ local EXTRA=
+ '[' -z localhost ']'
+ [[ '' =~ ^[0-9]+$ ]]
+ '[' -z ']'
+ '[' -z localhost ']'
+ EXTRA=' --host=localhost --protocol=tcp'
+ mysqladmin create unittest --user=unittest --password=unittest --host=localhost --protocol=tcp
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to MySQL server on 'localhost' (61)'
Check that mysqld is running on localhost and that the port is 3306.
You can check this by doing 'telnet localhost 3306'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment