From 2e8e82a303b9fd52d327efc1c2795df6610a0238 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Fri, 7 Oct 2016 19:03:14 -0400 Subject: [PATCH 01/13] Trying messy version... --- .travis.yml | 21 ++++++++++-- phing/build.yml | 6 ++-- phing/tasks/setup.xml | 15 -------- phing/tasks/tests.xml | 47 +++++++++++++++++++++----- scripts/common/chromedriver.sh | 12 +++++++ template/composer.json | 40 +++++++--------------- template/tests/behat/example.local.yml | 7 ---- 7 files changed, 86 insertions(+), 62 deletions(-) create mode 100755 scripts/common/chromedriver.sh diff --git a/.travis.yml b/.travis.yml index 6e0592754..ca86231a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ # Note that the example .travis.yml file for child projects lives in /install. sudo: true language: php +dist: trusty php: - 5.6 @@ -24,7 +25,12 @@ notifications: addons: ssh_known_hosts: - - svn-5223.devcloud.hosting.acquia.com + - svn-5223.devcloud.hosting.acquia.com + apt: + packages: + - mysql-server-5.6 + - mysql-client-core-5.6 + - mysql-client-5.6 before_install: # Decrypt private SSH key id_rsa_blt.enc, save as ~/.ssh/id_rsa_blt. @@ -40,7 +46,7 @@ before_install: - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - git config --global user.name "Travis-CI" - git config --global user.email "noreply@travis-ci.org" - - mysql -e 'CREATE DATABASE drupal;' + - mysql -u root -e 'CREATE DATABASE drupal;' install: # Load composer dependencies. @@ -54,6 +60,17 @@ install: - nvm use 4.4.1 # Initialize drupal console default configuration. - drupal init + # Initialize xvfb (see https://docs.travis-ci.com/user/gui-and-headless-browsers) + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" + # Installs chromedriver to vendor/bin. + - ./scripts/common/chromedriver.sh $TRAVIS_BUILD_DIR/vendor/bin +# - export CHROME_BIN=chromium-browser +# - sudo apt-get update +# - sudo apt-get install libgconf2-4 libnss3-1d libxss1 libappindicator1 fonts-liberation libstdc++6 lsb-base +# - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb +# - sudo dpkg -i google-chrome*.deb +# - sudo apt-get install -f before_script: # Clear drush release history cache, to pick up new releases. diff --git a/phing/build.yml b/phing/build.yml index 663d5fed6..de0022c53 100644 --- a/phing/build.yml +++ b/phing/build.yml @@ -5,12 +5,12 @@ behat: run-server: false # This is used for ad-hoc creation of a server via `drush runserver`. server-url: http://127.0.0.1:8888 - # If true, PhantomJS GhostDriver will be launched with Behat. - launch-phantom: true + # If true, Selenium standalone server will be launched with Behat. + launch-selenium: true # An array of paths with behat tests that should be executed. paths: # - ${docroot}/modules - # - ${docroot}/profiles + - ${docroot}/profiles - ${repo.root}/tests/behat tags: '~ajax' verbose: ${blt.verbose} diff --git a/phing/tasks/setup.xml b/phing/tasks/setup.xml index 1412dcb75..8d2e12dd7 100644 --- a/phing/tasks/setup.xml +++ b/phing/tasks/setup.xml @@ -15,21 +15,6 @@ - - - - - - - - - - - - Found PhantomJS at ${phantomjs.bin} - - - diff --git a/phing/tasks/tests.xml b/phing/tasks/tests.xml index 7ce54de9a..4c49d34e3 100644 --- a/phing/tasks/tests.xml +++ b/phing/tasks/tests.xml @@ -8,10 +8,10 @@ - + - + - +<<<<<<< HEAD + Attempting to generate tests/behat/local.yml. From 7a96007d99d189667a96828d4dbd6bfc405c0e91 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Fri, 7 Oct 2016 20:29:36 -0400 Subject: [PATCH 07/13] Updating install.md. --- INSTALL.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 824210906..e93ecfb79 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -20,7 +20,7 @@ Ensure that [Xcode](https://itunes.apple.com/us/app/xcode/id497799835?mt=12) is Then install the minimum dependencies for BLT. The preferred method is via Homebrew, though you could install these yourself without a package manager. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - brew install git composer drush + brew install php56 git composer drush composer global require "hirak/prestissimo:^0.3" If you'd like to create a VM with BLT, you will require the following additional libraries. If you'd like to use a LAMP stack other than Drupal VM, see [Local Development](readme/local-development.md). @@ -29,6 +29,10 @@ If you'd like to create a VM with BLT, you will require the following additional brew install ansible brew cask install virtualbox vagrant +If you'd like to execute Behat tests from the host machine, you will need Java: + + brew cask install java + ### Windows Windows is currently supported only when using the [Bash on Ubuntu on Windows](https://msdn.microsoft.com/en-us/commandline/wsl/about) feature available in the latest version of Windows 10. From 2117fdbb269a488889a04c4862ef6e1cc0cbd9bc Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Fri, 7 Oct 2016 20:31:04 -0400 Subject: [PATCH 08/13] Adding chrome install. --- scripts/linux/install-chrome.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/linux/install-chrome.sh b/scripts/linux/install-chrome.sh index f099d05d6..c44581321 100755 --- a/scripts/linux/install-chrome.sh +++ b/scripts/linux/install-chrome.sh @@ -1,9 +1,16 @@ #!/usr/bin/env bash +# Installs chromedriver and chrome for Linux 64 bit systems. +# Requires Trusty or higher. +# example usage `./install-chrome.sh usr/local/bin` # Scripts expect argument specifying bin dir. BIN_DIR=$1 if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then + # Download google chrome. + wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + sudo dpkg -i --force-depends google-chrome-stable_current_amd64.deb + # Installs chromedriver for Linux 64 bit systems. wget -N http://chromedriver.storage.googleapis.com/2.24/chromedriver_linux64.zip unzip chromedriver_linux64.zip From 62ac4793a0b351e6d47b6f88de3c1cb2a5fcced0 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Fri, 7 Oct 2016 21:24:51 -0400 Subject: [PATCH 09/13] Adding xvbf back. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5b147b96c..0a01c1a13 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,9 @@ install: # Initialize drupal console default configuration. - drupal init # Initialize xvfb (see https://docs.travis-ci.com/user/gui-and-headless-browsers) - - ./scripts/linux/xvbf.sh + - sudo apt-get install xvfb + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start # Installs chromedriver to vendor/bin. - ./scripts/linux/install-chrome.sh $TRAVIS_BUILD_DIR/vendor/bin From 34385613573c75a1556e81237973feafe3e3945d Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Fri, 7 Oct 2016 21:36:56 -0400 Subject: [PATCH 10/13] Removing xvbf script. --- scripts/pipelines/acquia-pipelines.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/pipelines/acquia-pipelines.yml b/scripts/pipelines/acquia-pipelines.yml index 50abded37..441ef4f81 100644 --- a/scripts/pipelines/acquia-pipelines.yml +++ b/scripts/pipelines/acquia-pipelines.yml @@ -27,10 +27,12 @@ events: - export PATH=$PATH:$BUILD_DIR/vendor/bin # Install chromedriver. - ./vendor/acquia/blt/scripts/linux/chromedriver.sh $BUILD_DIR/vendor/bin - # Install and start xvfb to enable headless use of chrome. - - ./vendor/acquia/blt/scripts/linux/xvfb.sh $BUILD_DIR/vendor/bin - - drupal init + # Initialize xvfb (see https://docs.travis-ci.com/user/gui-and-headless-browsers) + - sudo apt-get install xvfb + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start # The local.hostname must be set to 127.0.0.1:8888 because we are using drush runserver to test the site. + - drupal init - drupal yaml:update:value project.yml project.local.hostname '127.0.0.1:8888' - blt -Dbehat.run-server=true -Dcreate_alias=false -Dbehat.launch-phantom=true ci:build:validate:test From 4b57db0c342fbc0e3c87713c66fc85510dc2bb6c Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Fri, 7 Oct 2016 21:39:02 -0400 Subject: [PATCH 11/13] Reducing verbosity of kill targets. --- phing/tasks/tests.xml | 18 +++--------------- scripts/linux/xvbf.sh | 7 ------- 2 files changed, 3 insertions(+), 22 deletions(-) delete mode 100755 scripts/linux/xvbf.sh diff --git a/phing/tasks/tests.xml b/phing/tasks/tests.xml index ef52e094e..699f20cf9 100644 --- a/phing/tasks/tests.xml +++ b/phing/tasks/tests.xml @@ -74,18 +74,12 @@ passthru="true" spawn="true" checkreturn="true" -<<<<<<< HEAD - level="${blt.exec_level}"/> - - - -======= + level="${blt.exec_level}" logoutput="false"/> Selenium2 logs are being written to ${reports.selenium2}. ->>>>>>> Trying messy version... @@ -103,16 +97,10 @@ -<<<<<<< HEAD -