From 47e14f5e566984f79003899cb7304020b15cbe92 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 23 Nov 2012 15:59:01 +0100 Subject: [PATCH 1/6] Fixed $TRAVIS_BRANCH env var usage in before_script Fixes "class TableListField not found" errors in travis. Before that, we've been testing the 3.0 cms with master framework, which of course is a bad idea ;) --- tests/travis/before_script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/travis/before_script b/tests/travis/before_script index 3c1c5928..6abe5760 100755 --- a/tests/travis/before_script +++ b/tests/travis/before_script @@ -2,7 +2,7 @@ BUILD_DIR=$1 git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-installer.git $BUILD_DIR git clone --depth=100 --quiet git://github.com/silverstripe-labs/silverstripe-sqlite3.git $BUILD_DIR/sqlite3 git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-postgresql.git $BUILD_DIR/postgresql -git clone --depth=100 --quiet -b ${TRAVIS_BRANCH:-master} git://github.com/silverstripe/sapphire.git $BUILD_DIR/framework +git clone --depth=100 --quiet -b $TRAVIS_BRANCH git://github.com/silverstripe/sapphire.git $BUILD_DIR/framework cp $BUILD_DIR/framework/tests/travis/_ss_environment.php $BUILD_DIR cp $BUILD_DIR/framework/tests/travis/_config.php $BUILD_DIR/mysite cp -r . $BUILD_DIR/cms From b42cb5c308eb85df61e04ba2b91dc6e61fd522f0 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 23 Nov 2012 16:10:07 +0100 Subject: [PATCH 2/6] Passing through $TRAVIS_BRANCH to before_script --- .travis.yml | 2 +- tests/travis/before_script | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 01c0b2c4..9ea403e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ matrix: env: TESTDB=PGSQL before_script: - - ./tests/travis/before_script ~/builds/ss + - ./tests/travis/before_script ~/builds/ss $TRAVIS_BRANCH - cd ~/builds/ss script: diff --git a/tests/travis/before_script b/tests/travis/before_script index 6abe5760..dcf934ed 100755 --- a/tests/travis/before_script +++ b/tests/travis/before_script @@ -1,4 +1,5 @@ BUILD_DIR=$1 +TRAVIS_BRANCH=$2 git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-installer.git $BUILD_DIR git clone --depth=100 --quiet git://github.com/silverstripe-labs/silverstripe-sqlite3.git $BUILD_DIR/sqlite3 git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-postgresql.git $BUILD_DIR/postgresql From e67474293f182905e4e75cd6965ff45364ebe7fc Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 23 Nov 2012 16:20:14 +0100 Subject: [PATCH 3/6] More verbose travis build process --- tests/travis/before_script | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/travis/before_script b/tests/travis/before_script index dcf934ed..c3a62088 100755 --- a/tests/travis/before_script +++ b/tests/travis/before_script @@ -1,11 +1,30 @@ +#!/bin/sh + +### USAGE: before_script + BUILD_DIR=$1 TRAVIS_BRANCH=$2 + +# Fetch all dependencies +# TODO Replace with different composer.json variations + +echo "Checking out installer@master" git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-installer.git $BUILD_DIR + +echo "Checking out sqlite3@master" git clone --depth=100 --quiet git://github.com/silverstripe-labs/silverstripe-sqlite3.git $BUILD_DIR/sqlite3 + +echo "Checking out postgresql@master" git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-postgresql.git $BUILD_DIR/postgresql + +echo "Checking out sapphire@$TRAVIS_BRANCH" git clone --depth=100 --quiet -b $TRAVIS_BRANCH git://github.com/silverstripe/sapphire.git $BUILD_DIR/framework + +# Copy setup files cp $BUILD_DIR/framework/tests/travis/_ss_environment.php $BUILD_DIR cp $BUILD_DIR/framework/tests/travis/_config.php $BUILD_DIR/mysite + +# Copy actual project code into build directory (checked out by travis) cp -r . $BUILD_DIR/cms cd $BUILD_DIR From 8d5cea550cc4039cc365c269dc83cbbb9e8d6132 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 23 Nov 2012 16:31:47 +0100 Subject: [PATCH 4/6] TRAVIS_BRANCH doesn't seem to be set in before_script, hardcoding --- .travis.yml | 2 +- tests/travis/before_script | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9ea403e9..6bba86bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ matrix: env: TESTDB=PGSQL before_script: - - ./tests/travis/before_script ~/builds/ss $TRAVIS_BRANCH + - ./tests/travis/before_script ~/builds/ss - cd ~/builds/ss script: diff --git a/tests/travis/before_script b/tests/travis/before_script index c3a62088..9e932291 100755 --- a/tests/travis/before_script +++ b/tests/travis/before_script @@ -17,8 +17,8 @@ git clone --depth=100 --quiet git://github.com/silverstripe-labs/silverstripe-sq echo "Checking out postgresql@master" git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-postgresql.git $BUILD_DIR/postgresql -echo "Checking out sapphire@$TRAVIS_BRANCH" -git clone --depth=100 --quiet -b $TRAVIS_BRANCH git://github.com/silverstripe/sapphire.git $BUILD_DIR/framework +echo "Checking out sapphire@3.0" +git clone --depth=100 --quiet -b 3.0 git://github.com/silverstripe/sapphire.git $BUILD_DIR/framework # Copy setup files cp $BUILD_DIR/framework/tests/travis/_ss_environment.php $BUILD_DIR From d9e1bec2892311719ca9a066b65614862c30182e Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Mon, 26 Nov 2012 11:06:22 +1300 Subject: [PATCH 5/6] FIX CMS reference to Framework should avoid using self.version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 60c4ebe0..a9c84100 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,6 @@ "require": { "php": ">=5.3.2", "composer/installers": "*", - "silverstripe/framework": "self.version" + "silverstripe/framework": "3.0.*" } } \ No newline at end of file From 40a1a35618c185648ecb15a7d7f0a610e411964e Mon Sep 17 00:00:00 2001 From: Kirk Mayo Date: Mon, 26 Nov 2012 11:49:51 +1300 Subject: [PATCH 6/6] BUG Namespaces for CmsFormsContext and CmsUiContext are wrong --- tests/behat/features/bootstrap/FeatureContext.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/behat/features/bootstrap/FeatureContext.php b/tests/behat/features/bootstrap/FeatureContext.php index 859dc5e0..f9acec3d 100644 --- a/tests/behat/features/bootstrap/FeatureContext.php +++ b/tests/behat/features/bootstrap/FeatureContext.php @@ -5,8 +5,8 @@ namespace SilverStripe\Cms\Test\Behaviour; use SilverStripe\BehatExtension\Context\SilverStripeContext, SilverStripe\BehatExtension\Context\BasicContext, SilverStripe\BehatExtension\Context\LoginContext, - SilverStripe\Test\Behaviour\CmsFormsContext, - SilverStripe\Test\Behaviour\CmsUiContext; + SilverStripe\Framework\Test\Behaviour\CmsFormsContext, + SilverStripe\Framework\Test\Behaviour\CmsUiContext; // PHPUnit require_once 'PHPUnit/Autoload.php';