8000 Fold Travis CI output by component · symfony/symfony@f50048d · GitHub
[go: up one dir, main page]

Skip to content

Commit f50048d

Browse files
maidmaidnicolas-grekas
authored andcommitted
Fold Travis CI output by component
1 parent 301bfa4 commit f50048d

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

.travis.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ cache:
4040
services: mongodb
4141

4242
before_install:
43+
- fold_start () { echo "travis_fold:start:$(echo $1 | tr / .)"; echo -e "\\e[1;34m$1\\e[0m"; }
44+
- fold_start before_install
45+
- fold_end () { echo "travis_fold:end:$(echo $1 | tr / .)"; }
46+
- fold_wrap () { $T=$1; shift; fold_wrap_start $T; sh -c "$*" && fold_wrap_end $T; }
47+
- export -f fold_wrap
4348
- stty cols 120
4449
- PHP=$TRAVIS_PHP_VERSION
4550
# Matrix lines for intermediate PHP versions are skipped for pull requests
@@ -62,8 +67,10 @@ before_install:
6267
- if [[ ! $skip && ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
6368
- if [[ ! $skip ]]; then [ -d ~/.composer ] || mkdir ~/.composer; cp .composer/* ~/.composer/; fi
6469
- if [[ ! $skip ]]; then export PHPUNIT=$(readlink -f ./phpunit); fi
70+
- fold_end before_install
6571

6672
install:
73+
- fold_start install
6774
- if [[ ! $skip && $deps ]]; then cp composer.json composer.json.orig; fi
6875
- if [[ ! $skip && $deps ]]; then echo -e '{\n"require":{'"$(grep phpunit-bridge composer.json)"'"php":"*"},"minimum-stability":"dev"}' > composer.json; fi
6976
- if [[ ! $skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi
@@ -79,16 +86,22 @@ install:
7986
- export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
8087
- if [[ ! $skip && $deps ]]; then export SYMFONY_DEPRECATIONS_HELPER=weak; fi
8188
- if [[ ! $skip && $deps ]]; then mv composer.json.phpunit composer.json; fi
82-
- if [[ ! $skip ]]; then composer update --no-suggest; fi
8389
- if [[ ! $skip ]]; then ./phpunit install; fi
84-
- if [[ ! $skip && ! $PHP = hhvm* ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi
90+
- export COMPOSER_UP='fold_wrap composer composer update --no-progress --no-suggest --ansi'
91+
- |
92+
run_tests () {
93+
set -e
94+
if [[ ! $PHP = hhvm* ]]; then fold_wrap phpinfo php -i; else fold_wrap phpinfo hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi
95+
if [[ ! $skip ]]; then $COMPOSER_UP; fi
96+
if [[ $skip ]]; then echo -e "\\n\\e[1;34mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"; fi
97+
if [[ ! $deps && ! $PHP = hhvm* ]]; then echo "$COMPONENTS" | parallel --gnu 'fold_wrap {} $PHPUNIT --exclude-group tty,benchmark,intl-data {}'; fi
98+
if [[ ! $deps && ! $PHP = hhvm* ]]; then fold_wrap tty-group $PHPUNIT --group tty; fi
99+
if [[ ! $deps && $PHP = hhvm* ]]; then $PHPUNIT --exclude-group benchmark,intl-data; fi
100+
if [[ ! $deps && $PHP = ${MIN_PHP%.*} ]]; then echo -e "1\\n0" | xargs -I{} sh -c 'fold_wrap src/Symfony/Component/Process.sigchild{} ENHANCE_SIGCHLD={} php-$MIN_PHP/sapi/cli/php .phpunit/phpunit-4.8/phpunit --colors=always src/Symfony/Component/Process/'; fi
101+
if [[ $deps = high ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; fold_wrap {} $COMPOSER_UP && $PHPUNIT --exclude-group tty,benchmark,intl-data$LEGACY'; fi
102+
if [[ $deps = low ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; fold_wrap {} $COMPOSER_UP --prefer-lowest --prefer-stable && $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi
103+
}
104+
- fold_end install
85105

86106
script:
87-
- REPORT=' && echo -e "\\e[32mOK\\e[0m {}\\n\\n" || (echo -e "\\e[41mKO\\e[0m {}\\n\\n" && $(exit 1))'
88-
- if [[ $skip ]]; then echo -e "\\n\\e[1;34mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"; fi
89-
- if [[ ! $deps && ! $PHP = hhvm* ]]; then echo "$COMPONENTS" | parallel --gnu '$PHPUNIT --exclude-group tty,benchmark,intl-data {}'"$REPORT"; fi
90-
- if [[ ! $deps && ! $PHP = hhvm* ]]; then echo -e "\\nRunning tests requiring tty"; $PHPUNIT --group tty; fi
91-
- if [[ ! $deps && $PHP = hhvm* ]]; then $PHPUNIT --exclude-group benchmark,intl-data; fi
92-
- if [[ ! $deps && $PHP = ${MIN_PHP%.*} ]]; then echo -e "1\\n0" | xargs -I{} sh -c 'echo "\\nPHP --enable-sigchild enhanced={}" && ENHANCE_SIGCHLD={} php-$MIN_PHP/sapi/cli/php .phpunit/phpunit-4.8/phpunit --colors=always src/Symfony/Component/Process/'; fi
93-
- if [[ $deps = high ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer update --no-progress --no-suggest --ansi; $PHPUNIT --exclude-group tty,benchmark,intl-data'$LEGACY"$REPORT"; fi
94-
- if [[ $deps = low ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer update --no-progress --no-suggest --ansi --prefer-lowest --prefer-stable; $PHPUNIT --exclude-group tty,benchmark,intl-data'"$REPORT"; fi
107+
- run_tests

src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function testCollectConnections()
2424
$c = $this->createCollector(array());
2525
$c->collect(new Request(), new Response());
2626
$this->assertEquals(array('default' => 'doctrine.dbal.default_connection'), $c->getConnections());
27+
$this->assertTrue(false);
2728
}
2829

2930
public function testCollectManagers()

0 commit comments

Comments
 (0)
0