diff --git a/phing/tasks/setup.xml b/phing/tasks/setup.xml index 416d5e032..29ee4d877 100644 --- a/phing/tasks/setup.xml +++ b/phing/tasks/setup.xml @@ -14,6 +14,41 @@ + + + + + + + + + + + + + Found PhantomJS at ${phantomjs.bin} + + + + + + + + + + + + + One or more values in tests/behat/local.yml reference file paths that do not exist on this system. + Either correct the value(s) or remove tests/behat/local.yml so that it can be regenerated automatically from example.local.yml. + Values are: + drupal_root: ${behatConfig.local.extensions.Drupal\DrupalExtension.drupal.drupal_root}" + features: ${behatConfig.local.suites.default.paths.features}" + bootstrap: ${behatConfig.local.suites.default.paths.bootstrap} + Your Behat configuration is invalid. + + + diff --git a/readme/local-development.md b/readme/local-development.md index 4ac8cb79b..0c545bae2 100644 --- a/readme/local-development.md +++ b/readme/local-development.md @@ -47,7 +47,6 @@ To execute Behat tests using the 'drupal' driver on a Drupal VM environment, you 1. Update `tests/behat/local.yml` with the absolute file path to your project _inside the VM_. I.e., find and replace all instances of `host/machine/path/to/repo` with `/vm/path/to/repo`, which should look something like `var/www/[project.machine_name]`. 1. SSH into the VM `vagrant ssh`. 1. Change to your project directory `cd /var/www/[project.machine_name]`. -1. Assert that PhantomJS is installed for VM. Unfortunately, this requires building Composer dependencies while SSHed into the VM: `rm -rf vendor && composer install`. 1. Execute behat tests `blt tests:behat` #### Using the Drupal Extension's "drush" driver with Drupal VM diff --git a/scripts/blt/install-alias.sh b/scripts/blt/install-alias.sh index 2bf95c961..b63c505c7 100755 --- a/scripts/blt/install-alias.sh +++ b/scripts/blt/install-alias.sh @@ -35,6 +35,7 @@ if [ ! -z "$DETECTED_PROFILE" ]; then echo "BLT can automatically create a Bash alias to make it easier to run BLT tasks." echo "This alias may be created in .bash_profile or .bashrc depending on your system architecture." echo "" + sleep 1 if [ -z $REPLY ]; then read -p "Install alias? (y/n)" -n 1 -r diff --git a/scripts/drupal-vm/config.yml b/scripts/drupal-vm/config.yml index 1afd499c0..273ca0ec0 100644 --- a/scripts/drupal-vm/config.yml +++ b/scripts/drupal-vm/config.yml @@ -50,4 +50,4 @@ extra_packages: - php-bcmath post_provision_scripts: - - "../vendor/acquia/blt/scripts/drupal-vm/post-provision.sh" + - "../../../acquia/blt/scripts/drupal-vm/post-provision.sh" diff --git a/scripts/drupal-vm/post-provision.sh b/scripts/drupal-vm/post-provision.sh old mode 100644 new mode 100755 index 832233e57..2afaf2bd5 --- a/scripts/drupal-vm/post-provision.sh +++ b/scripts/drupal-vm/post-provision.sh @@ -1,3 +1,4 @@ #!/usr/bin/env bash -export $PATH=/var/www/$(hostname)/vendor/bin:$PATH +# Append vendor/bin to $PATH via ~/.bashrc modification. +grep -q -F 'export PATH=/var/www/$(hostname)/vendor/bin:$PATH' .bashrc || echo 'export PATH=/var/www/$(hostname)/vendor/bin:$PATH' >> .bashrc diff --git a/template/composer.json b/template/composer.json index 135a71272..ba624bbfa 100644 --- a/template/composer.json +++ b/template/composer.json @@ -60,6 +60,7 @@ } }, "scripts": { + "reinstall-phantomjs": "rm -rf vendor/bin/phantomjs && @install-phantomjs", "install-phantomjs": "PhantomInstaller\\Installer::installPhantomJS", "blt-alias": "blt install-alias -Dcreate_alias=true", "post-install-cmd": [