Fix Travis

This commit is contained in:
Romain Neutron
2012-05-03 15:58:31 +02:00
parent e35fc8f05b
commit bb4d64c5df
6 changed files with 20 additions and 14 deletions

View File

@@ -7,8 +7,8 @@ before_script:
- sudo apt-get update - sudo apt-get update
- sudo apt-get install -y mplayer ffmpeg ufraw dcraw libavcodec-extra-53 openoffice.org openoffice.org-writer unoconv ghostscript gsfonts ufraw graphicsmagick libgraphicsmagick1-dev libfreetype6-dev libjpeg-dev libgif-dev libtiff-dev libdjvulibre-dev libwmf-dev libmagickcore-dev libmagickwand-dev libpng-dev xpdf libexpat-dev gettext zlib1g-dev build-essential libfaac-dev libmp3lame0 libx264-dev libvpx-dev libtheora-dev libvorbis-dev gpac - sudo apt-get install -y mplayer ffmpeg ufraw dcraw libavcodec-extra-53 openoffice.org openoffice.org-writer unoconv ghostscript gsfonts ufraw graphicsmagick libgraphicsmagick1-dev libfreetype6-dev libjpeg-dev libgif-dev libtiff-dev libdjvulibre-dev libwmf-dev libmagickcore-dev libmagickwand-dev libpng-dev xpdf libexpat-dev gettext zlib1g-dev build-essential libfaac-dev libmp3lame0 libx264-dev libvpx-dev libtheora-dev libvorbis-dev gpac
- mysql -e 'create database ab_test;create database db_test; create database ab_unitTests; create database db_unitTests;' - mysql -e 'create database ab_test;create database db_test; create database ab_unitTests; create database db_unitTests;'
- mysql -e "GRANT ALL PRIVILEGES ON ab_unitTests.* TO 'phraseaUnitTests'@'localhost'" - sudo mysql -e "GRANT ALL PRIVILEGES ON ab_unitTests.* TO 'phraseaUnitTests'@'localhost' IDENTIFIED BY 'iWvGxPE8' WITH GRANT OPTION"
- mysql -e "GRANT ALL PRIVILEGES ON db_unitTests.* TO 'phraseaUnitTests'@'localhost'" - sudo mysql -e "GRANT ALL PRIVILEGES ON db_unitTests.* TO 'phraseaUnitTests'@'localhost' IDENTIFIED BY 'iWvGxPE8' WITH GRANT OPTION"
- mysql -e "source `pwd`/hudson/fixtures.sql" - mysql -e "source `pwd`/hudson/fixtures.sql"
- mysql -e 'SET GLOBAL time_zone = "+02:00";' - mysql -e 'SET GLOBAL time_zone = "+02:00";'
- git clone git://github.com/alchemy-fr/Phraseanet-Extension.git - git clone git://github.com/alchemy-fr/Phraseanet-Extension.git
@@ -17,12 +17,12 @@ before_script:
- wget http://www.swftools.org/swftools-0.9.1.tar.gz - wget http://www.swftools.org/swftools-0.9.1.tar.gz
- sh -c "tar xzvf swftools-0.9.1.tar.gz && cd swftools-0.9.1 && ./configure && make && sudo make install" - sh -c "tar xzvf swftools-0.9.1.tar.gz && cd swftools-0.9.1 && ./configure && make && sudo make install"
- wget http://pecl.php.net/get/gmagick-1.1.0RC2.tgz - wget http://pecl.php.net/get/gmagick-1.1.0RC2.tgz
- tar -xzf gmagick-1.1.0RC2.tgz - tar -xzf gmagick-1.1.0RC2.tgz
- sh -c "cd gmagick-1.1.0RC2 && phpize && ./configure --with-gmagick=/usr/local && make && sudo make install" - sh -c "cd gmagick-1.1.0RC2 && phpize && ./configure --with-gmagick=/usr/local && make && sudo make install"
- echo "extension=gmagick.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` - echo "extension=gmagick.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
notifications: notifications:
irc: irc:
channels: channels:
- "irc.freenode.org#phrasea" - "irc.freenode.org#phrasea"
template: template:

View File

@@ -1,7 +1,7 @@
database: database:
host: localhost host: localhost
port: port port: port
user: root user: phraseaUnitTests
password: password: iWvGxPE8
applicationBox: ab_unitTests applicationBox: ab_unitTests
dataBox: db_unitTests dataBox: db_unitTests

View File

@@ -39,8 +39,8 @@ return call_user_func(function() {
$app['upgrade'] = true; $app['upgrade'] = true;
} elseif (\setup::needUpgradeConfigurationFile()) { } elseif (\setup::needUpgradeConfigurationFile()) {
$connexionInc = new \SplFileInfo(__DIR__ . '/../../../../config/connexion.inc', true); $connexionInc = new \SplFileInfo(__DIR__ . '/../../../../config/connexion.inc');
$configInc = new \SplFileInfo(__DIR__ . '/../../../../config/config.inc', true); $configInc = new \SplFileInfo(__DIR__ . '/../../../../config/config.inc');
$configuration = \Alchemy\Phrasea\Core\Configuration::build(); $configuration = \Alchemy\Phrasea\Core\Configuration::build();
$configuration->upgradeFromOldConf($configInc, $connexionInc); $configuration->upgradeFromOldConf($configInc, $connexionInc);

View File

@@ -21,6 +21,9 @@ require_once __DIR__ . '/../../../vendor/symfony/yaml/Symfony/Component/Yaml/Yam
require_once __DIR__ . '/../../../vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php'; require_once __DIR__ . '/../../../vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php';
require_once __DIR__ . '/../../../vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php'; require_once __DIR__ . '/../../../vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php';
require_once __DIR__ . '/../../../vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php'; require_once __DIR__ . '/../../../vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php';
require_once __DIR__ . '/../../../vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/File.php';
require_once __DIR__ . '/../../../vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileException.php';
require_once __DIR__ . '/../../../vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php';
require_once __DIR__ . '/../../../vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php'; require_once __DIR__ . '/../../../vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php';
require_once __DIR__ . '/../../../vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php'; require_once __DIR__ . '/../../../vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php';

View File

@@ -11,6 +11,9 @@
namespace Alchemy\Phrasea\Core\Configuration; namespace Alchemy\Phrasea\Core\Configuration;
use Symfony\Component\HttpFoundation\File\File as SymfonyFile;
use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;
/** /**
* Precise some informations about phraseanet configuration mechanism * Precise some informations about phraseanet configuration mechanism
* *
@@ -70,17 +73,17 @@ class ApplicationSpecification implements Specification
protected function getConfigurationsFile() protected function getConfigurationsFile()
{ {
return new \SplFileInfo($this->getConfigurationsPathFile()); return new SymfonyFile($this->getConfigurationsPathFile(), true);
} }
protected function getConnexionsFile() protected function getConnexionsFile()
{ {
return new \SplFileInfo($this->getConnexionsPathFile()); return new SymfonyFile($this->getConnexionsPathFile(), true);
} }
protected function getServicesFile() protected function getServicesFile()
{ {
return new \SplFileInfo($this->getServicesPathFile()); return new SymfonyFile($this->getServicesPathFile(), true);
} }
public function delete() public function delete()
@@ -131,7 +134,7 @@ class ApplicationSpecification implements Specification
$this->getServicesFile(); $this->getServicesFile();
return true; return true;
} catch (\Exception $e) { } catch (FileNotFoundException $e) {
} }

View File

@@ -14,13 +14,13 @@ class ApplicationSetupTest extends PhraseanetWebTestCaseAbstract
public function createApplication() public function createApplication()
{ {
return require __DIR__ . '/../../../../Alchemy/Phrasea/Application/Setup.php'; return require __DIR__ . '/../../../../lib/Alchemy/Phrasea/Application/Setup.php';
} }
public function setUp() public function setUp()
{ {
parent::setUp(); parent::setUp();
$this->root = __DIR__ . '/../../../../../'; $this->root = __DIR__ . '/../../../../';
$this->client = $this->createClient(); $this->client = $this->createClient();
$this->temporaryUnInstall(); $this->temporaryUnInstall();
$this->appbox = appbox::get_instance(\bootstrap::getCore()); $this->appbox = appbox::get_instance(\bootstrap::getCore());