From 252f483a50bf4af783ad80cbdcf756f53129c0a9 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sun, 6 Apr 2014 15:31:12 -0700 Subject: [PATCH 1/4] Force test failures to prove Travis isn't failing builds properly. --- callbacks/healer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/callbacks/healer.php b/callbacks/healer.php index f4ffd44..0e19fc1 100644 --- a/callbacks/healer.php +++ b/callbacks/healer.php @@ -32,6 +32,7 @@ header('Cache-Control: no-cache, no-store, must-revalidate, max-age=0'); header('Pragma: no-cache'); header('Expires: 0'); +die(); // Bootstrap Drupal to the configuration stage. if (function_exists('drupal_bootstrap')) { From 741ca7a2d19c79926c645c4e721669411bddd032 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sun, 6 Apr 2014 15:43:29 -0700 Subject: [PATCH 2/4] Ensuring drush returns a non-zero exit code on test failure. --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33e2816..146e8c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,10 +10,9 @@ mysql: install: # install drush - - composer global require drush/drush:6.2.0 - - export PATH="$HOME/.composer/vendor/bin:$PATH" - - mkdir $HOME/.drush - - drush cc drush + - pear channel-discover pear.drush.org + - pear install drush/drush-5.10.0.0 + - phpenv rehash # install additional requirements - sudo apt-get update > /dev/null @@ -25,7 +24,7 @@ before_script: # create new site, stubbing sendmail path with true to prevent delivery errors and manually resolving drush path - mysql -e 'create database scale_addressfield' - - php -d sendmail_path=`which true` `dirname $(which drush)`/drush.php --yes core-quick-drupal --profile=testing --no-server --db-url=mysql://root:@127.0.0.1/scale_addressfield --enable=simpletest scale_addressfield + - php -d sendmail_path=`which true` `pear config-get php_dir`/drush/drush.php --yes core-quick-drupal --profile=testing --no-server --db-url=mysql://root:@127.0.0.1/scale_addressfield --enable=simpletest scale_addressfield # reference and enable scale_addressfield in the build site - ln -s $(readlink -e $(cd -)) scale_addressfield/drupal/sites/all/modules/scale_addressfield @@ -38,4 +37,5 @@ before_script: - sleep 4 - drush vset --yes simpletest_verbose FALSE -script: drush test-run 'Scale Address Field' --uri=http://127.0.0.1:8080 +script: + - drush test-run 'Scale Address Field' --uri=http://127.0.0.1:8080 From b0c8be96000da03505f5b9a91c2a943131de203b Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sun, 6 Apr 2014 19:52:54 -0700 Subject: [PATCH 3/4] Revert "Force test failures to prove Travis isn't failing builds properly." This reverts commit 252f483a50bf4af783ad80cbdcf756f53129c0a9. --- callbacks/healer.php | 1 - 1 file changed, 1 deletion(-) diff --git a/callbacks/healer.php b/callbacks/healer.php index 0e19fc1..f4ffd44 100644 --- a/callbacks/healer.php +++ b/callbacks/healer.php @@ -32,7 +32,6 @@ header('Cache-Control: no-cache, no-store, must-revalidate, max-age=0'); header('Pragma: no-cache'); header('Expires: 0'); -die(); // Bootstrap Drupal to the configuration stage. if (function_exists('drupal_bootstrap')) { From 2cacf2cc14fd19af38017abbc4f61e3ccbc745c1 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sun, 6 Apr 2014 20:06:36 -0700 Subject: [PATCH 4/4] Noting reasoning for drush 5.x vs. 6.x. --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 146e8c0..caedc35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ mysql: encoding: utf8 install: - # install drush + # install drush 5.x (because 6.x's test-run doesn't exit with proper status code). - pear channel-discover pear.drush.org - pear install drush/drush-5.10.0.0 - phpenv rehash @@ -37,5 +37,4 @@ before_script: - sleep 4 - drush vset --yes simpletest_verbose FALSE -script: - - drush test-run 'Scale Address Field' --uri=http://127.0.0.1:8080 +script: drush test-run 'Scale Address Field' --uri=http://127.0.0.1:8080