Bladeren bron

Add parallel build to travis script

Jordi Boggiano 11 jaren geleden
bovenliggende
commit
38917c2047
33 gewijzigde bestanden met toevoegingen van 37 en 30 verwijderingen
  1. 4 2
      .travis.yml
  2. 1 1
      tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
  3. 1 0
      tests/Composer/Test/CacheTest.php
  4. 1 1
      tests/Composer/Test/Command/InitCommandTest.php
  5. 1 0
      tests/Composer/Test/ComposerTest.php
  6. 1 1
      tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php
  7. 1 1
      tests/Composer/Test/DependencyResolver/PoolTest.php
  8. 1 1
      tests/Composer/Test/DependencyResolver/RequestTest.php
  9. 1 1
      tests/Composer/Test/DependencyResolver/RuleSetTest.php
  10. 1 1
      tests/Composer/Test/DependencyResolver/RuleTest.php
  11. 1 1
      tests/Composer/Test/DependencyResolver/SolverTest.php
  12. 1 1
      tests/Composer/Test/EventDispatcher/EventDispatcherTest.php
  13. 1 1
      tests/Composer/Test/IO/ConsoleIOTest.php
  14. 1 1
      tests/Composer/Test/IO/NullIOTest.php
  15. 1 1
      tests/Composer/Test/Installer/LibraryInstallerTest.php
  16. 1 0
      tests/Composer/Test/InstallerTest.php
  17. 1 1
      tests/Composer/Test/Package/CompletePackageTest.php
  18. 1 1
      tests/Composer/Test/Repository/ArrayRepositoryTest.php
  19. 1 1
      tests/Composer/Test/Repository/ArtifactRepositoryTest.php
  20. 1 1
      tests/Composer/Test/Repository/ComposerRepositoryTest.php
  21. 1 1
      tests/Composer/Test/Repository/CompositeRepositoryTest.php
  22. 1 1
      tests/Composer/Test/Repository/FilesystemRepositoryTest.php
  23. 1 1
      tests/Composer/Test/Repository/Pear/ChannelReaderTest.php
  24. 1 1
      tests/Composer/Test/Repository/Pear/ChannelRest10ReaderTest.php
  25. 1 1
      tests/Composer/Test/Repository/Pear/ChannelRest11ReaderTest.php
  26. 1 1
      tests/Composer/Test/Repository/Pear/PackageDependencyParserTest.php
  27. 1 1
      tests/Composer/Test/Repository/PearRepositoryTest.php
  28. 1 1
      tests/Composer/Test/Util/ErrorHandlerTest.php
  29. 1 1
      tests/Composer/Test/Util/FilesystemTest.php
  30. 1 1
      tests/Composer/Test/Util/ProcessExecutorTest.php
  31. 1 1
      tests/Composer/Test/Util/SpdxLicenseIdentifierTest.php
  32. 1 1
      tests/Composer/TestCase.php
  33. 2 0
      tests/bootstrap.php

+ 4 - 2
.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

+ 1 - 1
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

+ 1 - 0
tests/Composer/Test/CacheTest.php

@@ -13,6 +13,7 @@
 namespace Composer\Test;
 
 use Composer\Cache;
+use Composer\TestCase;
 
 class CacheTest extends TestCase
 {

+ 1 - 1
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
 {

+ 1 - 0
tests/Composer/Test/ComposerTest.php

@@ -13,6 +13,7 @@
 namespace Composer\Test;
 
 use Composer\Composer;
+use Composer\TestCase;
 
 class ComposerTest extends TestCase
 {

+ 1 - 1
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
 {

+ 1 - 1
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
 {

+ 1 - 1
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
 {

+ 1 - 1
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
 {

+ 1 - 1
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
 {

+ 1 - 1
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

+ 1 - 1
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;
 

+ 1 - 1
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
 {

+ 1 - 1
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
 {

+ 1 - 1
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;
 

+ 1 - 0
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
 {

+ 1 - 1
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
 {

+ 1 - 1
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
 {

+ 1 - 1
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;

+ 1 - 1
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;
 

+ 1 - 1
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
 {

+ 1 - 1
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
 {

+ 1 - 1
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;

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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
 {

+ 1 - 1
tests/Composer/Test/Repository/PearRepositoryTest.php

@@ -12,7 +12,7 @@
 
 namespace Composer\Repository;
 
-use Composer\Test\TestCase;
+use Composer\TestCase;
 
 /**
  * @group slow

+ 1 - 1
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

+ 1 - 1
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
 {

+ 1 - 1
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
 {

+ 1 - 1
tests/Composer/Test/Util/SpdxLicenseIdentifierTest.php

@@ -1,7 +1,7 @@
 <?php
 namespace Composer\Test\Util;
 
-use Composer\Test\TestCase;
+use Composer\TestCase;
 use Composer\Util\SpdxLicenseIdentifier;
 
 class SpdxLicenseIdentifierTest extends TestCase

+ 1 - 1
tests/Composer/Test/TestCase.php → tests/Composer/TestCase.php

@@ -10,7 +10,7 @@
  * file that was distributed with this source code.
  */
 
-namespace Composer\Test;
+namespace Composer;
 
 use Composer\Package\Version\VersionParser;
 use Composer\Package\Package;

+ 2 - 0
tests/bootstrap.php

@@ -14,3 +14,5 @@ error_reporting(E_ALL);
 
 $loader = require __DIR__.'/../src/bootstrap.php';
 $loader->add('Composer\Test', __DIR__);
+
+require __DIR__.'/Composer/TestCase.php';