From 38917c204758f1dd97569af299b3b87b3d0d2c10 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 25 Sep 2013 10:14:42 +0200 Subject: [PATCH] Add parallel build to travis script --- .travis.yml | 6 ++++-- tests/Composer/Test/Autoload/AutoloadGeneratorTest.php | 2 +- tests/Composer/Test/CacheTest.php | 1 + tests/Composer/Test/Command/InitCommandTest.php | 2 +- tests/Composer/Test/ComposerTest.php | 1 + .../Composer/Test/DependencyResolver/DefaultPolicyTest.php | 2 +- tests/Composer/Test/DependencyResolver/PoolTest.php | 2 +- tests/Composer/Test/DependencyResolver/RequestTest.php | 2 +- tests/Composer/Test/DependencyResolver/RuleSetTest.php | 2 +- tests/Composer/Test/DependencyResolver/RuleTest.php | 2 +- tests/Composer/Test/DependencyResolver/SolverTest.php | 2 +- tests/Composer/Test/EventDispatcher/EventDispatcherTest.php | 2 +- tests/Composer/Test/IO/ConsoleIOTest.php | 2 +- tests/Composer/Test/IO/NullIOTest.php | 2 +- tests/Composer/Test/Installer/LibraryInstallerTest.php | 2 +- tests/Composer/Test/InstallerTest.php | 1 + tests/Composer/Test/Package/CompletePackageTest.php | 2 +- tests/Composer/Test/Repository/ArrayRepositoryTest.php | 2 +- tests/Composer/Test/Repository/ArtifactRepositoryTest.php | 2 +- tests/Composer/Test/Repository/ComposerRepositoryTest.php | 2 +- tests/Composer/Test/Repository/CompositeRepositoryTest.php | 2 +- tests/Composer/Test/Repository/FilesystemRepositoryTest.php | 2 +- tests/Composer/Test/Repository/Pear/ChannelReaderTest.php | 2 +- .../Test/Repository/Pear/ChannelRest10ReaderTest.php | 2 +- .../Test/Repository/Pear/ChannelRest11ReaderTest.php | 2 +- .../Test/Repository/Pear/PackageDependencyParserTest.php | 2 +- tests/Composer/Test/Repository/PearRepositoryTest.php | 2 +- tests/Composer/Test/Util/ErrorHandlerTest.php | 2 +- tests/Composer/Test/Util/FilesystemTest.php | 2 +- tests/Composer/Test/Util/ProcessExecutorTest.php | 2 +- tests/Composer/Test/Util/SpdxLicenseIdentifierTest.php | 2 +- tests/Composer/{Test => }/TestCase.php | 2 +- tests/bootstrap.php | 2 ++ 33 files changed, 37 insertions(+), 30 deletions(-) rename tests/Composer/{Test => }/TestCase.php (98%) diff --git a/.travis.yml b/.travis.yml index a897f3cee..ad72478df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,12 @@ php: - 5.4 - 5.5 -before_script: +before_script: + - sudo apt-get install parallel - echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini - composer install --dev --prefer-source - git config --global user.name travis-ci - git config --global user.email travis@example.com -script: ./vendor/bin/phpunit -c tests/complete.phpunit.xml +script: + - ls -d tests/Composer/Test/* | parallel --gnu --keep-order 'echo "Running {} tests"; ./vendor/bin/phpunit -c tests/complete.phpunit.xml {};' || exit 1 diff --git a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php index 1fe825197..cecdfb4a3 100644 --- a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php +++ b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php @@ -17,7 +17,7 @@ use Composer\Package\Link; use Composer\Util\Filesystem; use Composer\Package\AliasPackage; use Composer\Package\Package; -use Composer\Test\TestCase; +use Composer\TestCase; use Composer\Script\ScriptEvents; class AutoloadGeneratorTest extends TestCase diff --git a/tests/Composer/Test/CacheTest.php b/tests/Composer/Test/CacheTest.php index ba2ea77ad..80c7de6bf 100644 --- a/tests/Composer/Test/CacheTest.php +++ b/tests/Composer/Test/CacheTest.php @@ -13,6 +13,7 @@ namespace Composer\Test; use Composer\Cache; +use Composer\TestCase; class CacheTest extends TestCase { diff --git a/tests/Composer/Test/Command/InitCommandTest.php b/tests/Composer/Test/Command/InitCommandTest.php index 4b295ef16..dbcbe0bda 100644 --- a/tests/Composer/Test/Command/InitCommandTest.php +++ b/tests/Composer/Test/Command/InitCommandTest.php @@ -13,7 +13,7 @@ namespace Composer\Test\Command; use Composer\Command\InitCommand; -use Composer\Test\TestCase; +use Composer\TestCase; class InitCommandTest extends TestCase { diff --git a/tests/Composer/Test/ComposerTest.php b/tests/Composer/Test/ComposerTest.php index 023cee1f8..f667e88e5 100644 --- a/tests/Composer/Test/ComposerTest.php +++ b/tests/Composer/Test/ComposerTest.php @@ -13,6 +13,7 @@ namespace Composer\Test; use Composer\Composer; +use Composer\TestCase; class ComposerTest extends TestCase { diff --git a/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php b/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php index 4d50fa6c5..9e9952228 100644 --- a/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php +++ b/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php @@ -19,7 +19,7 @@ use Composer\DependencyResolver\Pool; use Composer\Package\Link; use Composer\Package\AliasPackage; use Composer\Package\LinkConstraint\VersionConstraint; -use Composer\Test\TestCase; +use Composer\TestCase; class DefaultPolicyTest extends TestCase { diff --git a/tests/Composer/Test/DependencyResolver/PoolTest.php b/tests/Composer/Test/DependencyResolver/PoolTest.php index aa38fa31d..14b24fc9f 100644 --- a/tests/Composer/Test/DependencyResolver/PoolTest.php +++ b/tests/Composer/Test/DependencyResolver/PoolTest.php @@ -15,7 +15,7 @@ namespace Composer\Test\DependencyResolver; use Composer\DependencyResolver\Pool; use Composer\Repository\ArrayRepository; use Composer\Package\BasePackage; -use Composer\Test\TestCase; +use Composer\TestCase; class PoolTest extends TestCase { diff --git a/tests/Composer/Test/DependencyResolver/RequestTest.php b/tests/Composer/Test/DependencyResolver/RequestTest.php index 89639bc44..d8cb865a0 100644 --- a/tests/Composer/Test/DependencyResolver/RequestTest.php +++ b/tests/Composer/Test/DependencyResolver/RequestTest.php @@ -15,7 +15,7 @@ namespace Composer\Test\DependencyResolver; use Composer\DependencyResolver\Request; use Composer\DependencyResolver\Pool; use Composer\Repository\ArrayRepository; -use Composer\Test\TestCase; +use Composer\TestCase; class RequestTest extends TestCase { diff --git a/tests/Composer/Test/DependencyResolver/RuleSetTest.php b/tests/Composer/Test/DependencyResolver/RuleSetTest.php index a6b108500..35e3f17d6 100644 --- a/tests/Composer/Test/DependencyResolver/RuleSetTest.php +++ b/tests/Composer/Test/DependencyResolver/RuleSetTest.php @@ -16,7 +16,7 @@ use Composer\DependencyResolver\Rule; use Composer\DependencyResolver\RuleSet; use Composer\DependencyResolver\Pool; use Composer\Repository\ArrayRepository; -use Composer\Test\TestCase; +use Composer\TestCase; class RuleSetTest extends TestCase { diff --git a/tests/Composer/Test/DependencyResolver/RuleTest.php b/tests/Composer/Test/DependencyResolver/RuleTest.php index 8d4c732a2..10667632d 100644 --- a/tests/Composer/Test/DependencyResolver/RuleTest.php +++ b/tests/Composer/Test/DependencyResolver/RuleTest.php @@ -15,7 +15,7 @@ namespace Composer\Test\DependencyResolver; use Composer\DependencyResolver\Rule; use Composer\DependencyResolver\Pool; use Composer\Repository\ArrayRepository; -use Composer\Test\TestCase; +use Composer\TestCase; class RuleTest extends TestCase { diff --git a/tests/Composer/Test/DependencyResolver/SolverTest.php b/tests/Composer/Test/DependencyResolver/SolverTest.php index 5773d62ee..349f6e3b4 100644 --- a/tests/Composer/Test/DependencyResolver/SolverTest.php +++ b/tests/Composer/Test/DependencyResolver/SolverTest.php @@ -18,7 +18,7 @@ use Composer\DependencyResolver\Request; use Composer\DependencyResolver\Solver; use Composer\DependencyResolver\SolverProblemsException; use Composer\Package\Link; -use Composer\Test\TestCase; +use Composer\TestCase; use Composer\Package\LinkConstraint\MultiConstraint; class SolverTest extends TestCase diff --git a/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php b/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php index 7a15679d1..fd26b0a3c 100644 --- a/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php +++ b/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php @@ -14,7 +14,7 @@ namespace Composer\Test\EventDispatcher; use Composer\EventDispatcher\Event; use Composer\EventDispatcher\EventDispatcher; -use Composer\Test\TestCase; +use Composer\TestCase; use Composer\Script; use Composer\Util\ProcessExecutor; diff --git a/tests/Composer/Test/IO/ConsoleIOTest.php b/tests/Composer/Test/IO/ConsoleIOTest.php index 0d76758d4..3a4313f69 100644 --- a/tests/Composer/Test/IO/ConsoleIOTest.php +++ b/tests/Composer/Test/IO/ConsoleIOTest.php @@ -13,7 +13,7 @@ namespace Composer\Test\IO; use Composer\IO\ConsoleIO; -use Composer\Test\TestCase; +use Composer\TestCase; class ConsoleIOTest extends TestCase { diff --git a/tests/Composer/Test/IO/NullIOTest.php b/tests/Composer/Test/IO/NullIOTest.php index cb2023d49..feb586f95 100644 --- a/tests/Composer/Test/IO/NullIOTest.php +++ b/tests/Composer/Test/IO/NullIOTest.php @@ -13,7 +13,7 @@ namespace Composer\Test\IO; use Composer\IO\NullIO; -use Composer\Test\TestCase; +use Composer\TestCase; class NullIOTest extends TestCase { diff --git a/tests/Composer/Test/Installer/LibraryInstallerTest.php b/tests/Composer/Test/Installer/LibraryInstallerTest.php index dd36e6184..5ea4f076b 100644 --- a/tests/Composer/Test/Installer/LibraryInstallerTest.php +++ b/tests/Composer/Test/Installer/LibraryInstallerTest.php @@ -14,7 +14,7 @@ namespace Composer\Test\Installer; use Composer\Installer\LibraryInstaller; use Composer\Util\Filesystem; -use Composer\Test\TestCase; +use Composer\TestCase; use Composer\Composer; use Composer\Config; diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/InstallerTest.php index e3ec2b927..bd9e7d3b6 100644 --- a/tests/Composer/Test/InstallerTest.php +++ b/tests/Composer/Test/InstallerTest.php @@ -27,6 +27,7 @@ use Composer\Test\Mock\InstalledFilesystemRepositoryMock; use Composer\Test\Mock\InstallationManagerMock; use Symfony\Component\Console\Input\StringInput; use Symfony\Component\Console\Output\StreamOutput; +use Composer\TestCase; class InstallerTest extends TestCase { diff --git a/tests/Composer/Test/Package/CompletePackageTest.php b/tests/Composer/Test/Package/CompletePackageTest.php index b6f90928c..de119ebaa 100644 --- a/tests/Composer/Test/Package/CompletePackageTest.php +++ b/tests/Composer/Test/Package/CompletePackageTest.php @@ -14,7 +14,7 @@ namespace Composer\Test\Package; use Composer\Package\Package; use Composer\Package\Version\VersionParser; -use Composer\Test\TestCase; +use Composer\TestCase; class CompletePackageTest extends TestCase { diff --git a/tests/Composer/Test/Repository/ArrayRepositoryTest.php b/tests/Composer/Test/Repository/ArrayRepositoryTest.php index 6852f7dd6..434b3da99 100644 --- a/tests/Composer/Test/Repository/ArrayRepositoryTest.php +++ b/tests/Composer/Test/Repository/ArrayRepositoryTest.php @@ -13,7 +13,7 @@ namespace Composer\Test\Repository; use Composer\Repository\ArrayRepository; -use Composer\Test\TestCase; +use Composer\TestCase; class ArrayRepositoryTest extends TestCase { diff --git a/tests/Composer/Test/Repository/ArtifactRepositoryTest.php b/tests/Composer/Test/Repository/ArtifactRepositoryTest.php index 5ffae515a..109b53bfb 100644 --- a/tests/Composer/Test/Repository/ArtifactRepositoryTest.php +++ b/tests/Composer/Test/Repository/ArtifactRepositoryTest.php @@ -12,7 +12,7 @@ namespace Composer\Repository; -use Composer\Test\TestCase; +use Composer\TestCase; use Composer\IO\NullIO; use Composer\Config; use Composer\Package\BasePackage; diff --git a/tests/Composer/Test/Repository/ComposerRepositoryTest.php b/tests/Composer/Test/Repository/ComposerRepositoryTest.php index bad24d6d4..5109ee41f 100644 --- a/tests/Composer/Test/Repository/ComposerRepositoryTest.php +++ b/tests/Composer/Test/Repository/ComposerRepositoryTest.php @@ -15,7 +15,7 @@ namespace Composer\Test\Repository; use Composer\Repository\ComposerRepository; use Composer\IO\NullIO; use Composer\Test\Mock\FactoryMock; -use Composer\Test\TestCase; +use Composer\TestCase; use Composer\Package\Loader\ArrayLoader; use Composer\Package\Version\VersionParser; diff --git a/tests/Composer/Test/Repository/CompositeRepositoryTest.php b/tests/Composer/Test/Repository/CompositeRepositoryTest.php index 978587133..d9f8b70e3 100644 --- a/tests/Composer/Test/Repository/CompositeRepositoryTest.php +++ b/tests/Composer/Test/Repository/CompositeRepositoryTest.php @@ -14,7 +14,7 @@ namespace Composer\Test\Repository; use Composer\Repository\CompositeRepository; use Composer\Repository\ArrayRepository; -use Composer\Test\TestCase; +use Composer\TestCase; class CompositeRepositoryTest extends TestCase { diff --git a/tests/Composer/Test/Repository/FilesystemRepositoryTest.php b/tests/Composer/Test/Repository/FilesystemRepositoryTest.php index f80a91889..fa6214dee 100644 --- a/tests/Composer/Test/Repository/FilesystemRepositoryTest.php +++ b/tests/Composer/Test/Repository/FilesystemRepositoryTest.php @@ -13,7 +13,7 @@ namespace Composer\Repository; use Composer\Repository\FilesystemRepository; -use Composer\Test\TestCase; +use Composer\TestCase; class FilesystemRepositoryTest extends TestCase { diff --git a/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php b/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php index 127c5689c..214d7b702 100644 --- a/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php +++ b/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php @@ -12,7 +12,7 @@ namespace Composer\Repository\Pear; -use Composer\Test\TestCase; +use Composer\TestCase; use Composer\Package\Version\VersionParser; use Composer\Package\LinkConstraint\VersionConstraint; use Composer\Package\Link; diff --git a/tests/Composer/Test/Repository/Pear/ChannelRest10ReaderTest.php b/tests/Composer/Test/Repository/Pear/ChannelRest10ReaderTest.php index ac4f377be..299eae37b 100644 --- a/tests/Composer/Test/Repository/Pear/ChannelRest10ReaderTest.php +++ b/tests/Composer/Test/Repository/Pear/ChannelRest10ReaderTest.php @@ -12,7 +12,7 @@ namespace Composer\Repository\Pear; -use Composer\Test\TestCase; +use Composer\TestCase; use Composer\Test\Mock\RemoteFilesystemMock; class ChannelRest10ReaderTest extends TestCase diff --git a/tests/Composer/Test/Repository/Pear/ChannelRest11ReaderTest.php b/tests/Composer/Test/Repository/Pear/ChannelRest11ReaderTest.php index 58105a5eb..08420786e 100644 --- a/tests/Composer/Test/Repository/Pear/ChannelRest11ReaderTest.php +++ b/tests/Composer/Test/Repository/Pear/ChannelRest11ReaderTest.php @@ -12,7 +12,7 @@ namespace Composer\Repository\Pear; -use Composer\Test\TestCase; +use Composer\TestCase; use Composer\Test\Mock\RemoteFilesystemMock; class ChannelRest11ReaderTest extends TestCase diff --git a/tests/Composer/Test/Repository/Pear/PackageDependencyParserTest.php b/tests/Composer/Test/Repository/Pear/PackageDependencyParserTest.php index c2d77aef0..4f43d39f0 100644 --- a/tests/Composer/Test/Repository/Pear/PackageDependencyParserTest.php +++ b/tests/Composer/Test/Repository/Pear/PackageDependencyParserTest.php @@ -12,7 +12,7 @@ namespace Composer\Repository\Pear; -use Composer\Test\TestCase; +use Composer\TestCase; class PackageDependencyParserTest extends TestCase { diff --git a/tests/Composer/Test/Repository/PearRepositoryTest.php b/tests/Composer/Test/Repository/PearRepositoryTest.php index 35e05fc2c..a42c8e0b3 100644 --- a/tests/Composer/Test/Repository/PearRepositoryTest.php +++ b/tests/Composer/Test/Repository/PearRepositoryTest.php @@ -12,7 +12,7 @@ namespace Composer\Repository; -use Composer\Test\TestCase; +use Composer\TestCase; /** * @group slow diff --git a/tests/Composer/Test/Util/ErrorHandlerTest.php b/tests/Composer/Test/Util/ErrorHandlerTest.php index e24fe3f39..485c2bd39 100644 --- a/tests/Composer/Test/Util/ErrorHandlerTest.php +++ b/tests/Composer/Test/Util/ErrorHandlerTest.php @@ -13,7 +13,7 @@ namespace Composer\Test\Util; use Composer\Util\ErrorHandler; -use Composer\Test\TestCase; +use Composer\TestCase; /** * ErrorHandler test case diff --git a/tests/Composer/Test/Util/FilesystemTest.php b/tests/Composer/Test/Util/FilesystemTest.php index 88fad9289..3b565ded4 100644 --- a/tests/Composer/Test/Util/FilesystemTest.php +++ b/tests/Composer/Test/Util/FilesystemTest.php @@ -13,7 +13,7 @@ namespace Composer\Test\Util; use Composer\Util\Filesystem; -use Composer\Test\TestCase; +use Composer\TestCase; class FilesystemTest extends TestCase { diff --git a/tests/Composer/Test/Util/ProcessExecutorTest.php b/tests/Composer/Test/Util/ProcessExecutorTest.php index 716a2daa7..b15a2763f 100644 --- a/tests/Composer/Test/Util/ProcessExecutorTest.php +++ b/tests/Composer/Test/Util/ProcessExecutorTest.php @@ -13,7 +13,7 @@ namespace Composer\Test\Util; use Composer\Util\ProcessExecutor; -use Composer\Test\TestCase; +use Composer\TestCase; class ProcessExecutorTest extends TestCase { diff --git a/tests/Composer/Test/Util/SpdxLicenseIdentifierTest.php b/tests/Composer/Test/Util/SpdxLicenseIdentifierTest.php index 2ed7c1819..b6cee4ec5 100644 --- a/tests/Composer/Test/Util/SpdxLicenseIdentifierTest.php +++ b/tests/Composer/Test/Util/SpdxLicenseIdentifierTest.php @@ -1,7 +1,7 @@ add('Composer\Test', __DIR__); + +require __DIR__.'/Composer/TestCase.php';