8000 merged branch jakzal/travis-parallel-tests (PR #9018) · symfony/symfony@9016f7d · GitHub
[go: up one dir, main page]

Skip to content

Commit 9016f7d

Browse files
committed
merged branch jakzal/travis-parallel-tests (PR #9018)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9018). Discussion ---------- Parallelized travis builds | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Yet another approach to running all tests in parallel (see #7708 and #8312). This one uses [GNU Parallel](http://www.gnu.org/software/parallel/) which by default [will run one job per available CPU](http://www.gnu.org/software/parallel/man.html#jobs_n). Comparison of random builds (recent build times on my travis account): | PHP version| [master](https://travis-ci.org/jakzal/symfony/builds/11300678) | [parallel](https://travis-ci.org/jakzal/symfony/builds/11300689) | ------------- | --- | --- | 5.3.3| 6 min 11 sec | 3 min 45 sec | 5.3| 7 min 26 sec | 4 min 10 sec | 5.4| 6 min 31 sec | 3 min 31 sec | 5.5| 6 min 37 sec | 3 min 45 sec On my laptop it takes 1.5min to run a whole suite parallelised (compared to over 4min when run as usual). Commits ------- de8d1b5 Run all tests in parallel.
2 parents b3c76ef + bcbe8d2 commit 9016f7d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ php:
77
- 5.5
88

99
before_script:
10+
- sudo apt-get install parallel
1011
- echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
1112
- sh -c 'if [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
1213
- COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install
1314
- php src/Symfony/Component/Locale/Resources/data/build-data.php
1415
- export USE_INTL_ICU_DATA_VERSION=1
16+
17+
script:
18+
- ls -d src/Symfony/*/* | parallel --gnu --keep-order 'echo "Running {} tests"; phpunit --exclude-group tty,benchmark {};' || exit 1
19+
- echo "Running tests requiring tty"; phpunit --group tty

src/Symfony/Component/Console/Tests/Helper/DialogHelperTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ public function testAskWithAutocomplete()
8787
$this->assertEquals('FooBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles));
8888
}
8989

90+
/**
91+
* @group tty
92+
*/
9093
public function testAskHiddenResponse()
9194
{
9295
if (defined('PHP_WINDOWS_VERSION_BUILD')) {

0 commit comments

Comments
 (0)
0