8000 [ci] Enable collecting and replaying skipped tests by nicolas-grekas · Pull Request #16190 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000

[ci] Enable collecting and replaying skipped tests #16190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ install:
- if [ "$deps" != "skip" ] && [ "$deps" != "no" ]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $COMPONENTS; fi;

script:
- if [ "$deps" = "no" ]; then echo "$COMPONENTS" | parallel --gnu 'echo -e "\\nRunning {} tests"; $PHPUNIT --exclude-group tty,benchmark,intl-data {}'; fi;
- if [ "$deps" = "no" ]; then echo "$COMPONENTS" | parallel --gnu '$PHPUNIT --exclude-group tty,benchmark,intl-data {}'; fi;
- if [ "$deps" = "no" ]; then echo -e "\\nRunning tests requiring tty"; $PHPUNIT --group tty; fi;
- if [ "$deps" = "high" ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi;
- if [ "$deps" = "low" ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi;
- if [ "$deps" = "high" ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer --prefer-source update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi;
- if [ "$deps" = "low" ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi;
- if [ "$deps" = "skip" ]; then echo 'This matrix line is skipped for pull requests.'; fi;
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ init:
- SET PHP=1
- SET ANSICON=121x90 (121x90)
- SET PHP_INI_MATRIX=php.ini-min php.ini-max
- SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped

install:
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
Expand All @@ -32,6 +33,7 @@ install:
- IF %PHP%==1 cd ..
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- IF %PHP%==1 copy /Y php.ini-development php.ini-min
- IF %PHP%==1 echo max_execution_time=1200 >> php.ini-min
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini-min
- IF %PHP%==1 echo extension_dir=ext >> php.ini-min
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini-min
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"symfony/yaml": "self.version"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"doctrine/data-fixtures": "1.0.*",
"doctrine/dbal": "~2.4",
"doctrine/orm": "~2.4,>=2.4.5",
Expand Down
16 changes: 14 additions & 2 deletions phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit")) {
// Build a standalone phpunit without symfony/yaml

$oldPwd = getcwd();
mkdir($PHPUNIT_DIR);
@mkdir($PHPUNIT_DIR);
chdir($PHPUNIT_DIR);
if (extension_loaded('openssl') && ini_get('allow_url_fopen')) {
stream_copy_to_stream(fopen("https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip", 'rb'), fopen("$PHPUNIT_VERSION.zip", 'wb'));
Expand All @@ -41,6 +41,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit")) {
$zip->close();
chdir("phpunit-$PHPUNIT_VERSION");
passthru("$COMPOSER remove --no-update symfony/yaml");
passthru("$COMPOSER require --dev --no-update symfony/phpunit-bridge \">=2.8@dev\"");
passthru("$COMPOSER install --prefer-source --no-progress --ansi");
chdir($oldPwd);
}
Expand Down Expand Up @@ -76,10 +77,13 @@ if ($phpIniMatrix) {
if (isset($argv[1]) && 'symfony' === $argv[1]) {
// Find Symfony components in plain php for Windows portability

$finder = new RecursiveDirectoryIterator(__DIR__.'/src/Symfony', FilesystemIterator::KEY_AS_FILENAME | FilesystemIterator::UNIX_PATHS);
$oldPwd = getcwd();
chdir(__DIR__);
$finder = new RecursiveDirectoryIterator('src/Symfony', FilesystemIterator::KEY_AS_FILENAME | FilesystemIterator::UNIX_PATHS);
$finder = new RecursiveIteratorIterator($finder);
$finder->setMaxDepth(3);

$skippedTests = isset($_SERVER['SYMFONY_PHPUNIT_SKIPPED_TESTS']) ? $_SERVER['SYMFONY_PHPUNIT_SKIPPED_TESTS'] : false;
$runningProcs = array();

foreach ($finder as $file => $fileInfo) {
Expand All @@ -88,6 +92,10 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {

// Run phpunit tests in parallel

if ($skippedTests) {
putenv("SYMFONY_PHPUNIT_SKIPPED_TESTS=$component/$skippedTests");
}

$c = ProcessUtils::escapeArgument($component);

if ($proc = proc_open(sprintf($cmd, $c, " > $c/phpunit.stdout 2> $c/phpunit.stderr"), array(), $pipes)) {
Expand All @@ -98,6 +106,7 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
}
}
}
chdir($oldPwd);

// Fixes for colors support on appveyor
// See https://github.com/appveyor/ci/issues/373
Expand Down Expand Up @@ -139,6 +148,9 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
}
unlink($file);
}
if ($skippedTests) {
@unlink("$component/$skippedTests");
}

if ($procStatus) {
$exit = 1;
Expand Down
4 changes: 4 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
1 change: 0 additions & 1 deletion src/Symfony/Bridge/Doctrine/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"doctrine/common": "~2.4"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/stopwatch": "~2.2",
"symfony/dependency-injection": "~2.0,>=2.0.5",
"symfony/form": "~2.3,>=2.3.8",
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bridge/Doctrine/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
3 changes: 0 additions & 3 deletions src/Symfony/Bridge/Monolog/composer.json
F438
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
"symfony/http-kernel": "~2.2",
"monolog/monolog": "~1.3"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
},
"autoload": {
"psr-0": { "Symfony\\Bridge\\Monolog\\": "" }
},
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bridge/Monolog/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
1 change: 0 additions & 1 deletion src/Symfony/Bridge/Propel1/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"propel/propel1": "~1.6,>=1.6.5"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/stopwatch": "~2.2"
},
"autoload": {
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bridge/Propel1/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
1 change: 0 additions & 1 deletion src/Symfony/Bridge/ProxyManager/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"ocramius/proxy-manager": "~0.3.1"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/config": "~2.3"
},
"autoload": {
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bridge/ProxyManager/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
3 changes: 0 additions & 3 deletions src/Symfony/Bridge/Swiftmailer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
"php": ">=5.3.3",
"swiftmailer/swiftmailer": ">=4.2.0,<6.0-dev"
},
"require-dev": {
"symfony/phpunit-bridge": &quo 10000 t;~2.7"
},
"suggest": {
"symfony/http-kernel": ""
},
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Bridge/Twig/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"twig/twig": "~1.20|~2.0"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/finder": "~2.3",
"symfony/form": "~2.3.31",
"symfony/http-kernel": "~2.3",
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bridge/Twig/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
1 change: 0 additions & 1 deletion src/Symfony/Bundle/FrameworkBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"doctrine/common": "~2.2"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/browser-kit": "~2.3",
"symfony/console": "~2.3",
"symfony/css-selector": "~2.0,>=2.0.5",
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
1 change: 0 additions & 1 deletion src/Symfony/Bundle/SecurityBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"symfony/http-kernel": "~2.2"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/browser-kit": "~2.3",
"symfony/css-selector": "~2.0,>=2.0.5",
"symfony/dependency-injection": "~2.3",
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
10000
1 change: 0 additions & 1 deletion src/Symfony/Bundle/TwigBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/stopwatch": "~2.2",
"symfony/dependency-injection": "~2.2",
"symfony/config": "~2.2",
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bundle/TwigBundle/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
1 change: 0 additions & 1 deletion src/Symfony/Bundle/WebProfilerBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"symfony/twig-bridge": "~2.2"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/config": "~2.2",
"symfony/console": "~2.3",
"symfony/dependency-injection": "~2.2",
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
1 change: 0 additions & 1 deletion src/Symfony/Component/BrowserKit/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"symfony/dom-crawler": "~2.0,>=2.0.5"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/process": "~2.0,>=2.0.5",
"symfony/css-selector": "~2.0,>=2.0.5"
},
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/BrowserKit/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
1 change: 0 additions & 1 deletion src/Symfony/Component/ClassLoader/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"php": ">=5.3.3"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/finder": "~2.0,>=2.0.5"
},
"autoload": {
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/ClassLoader/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
3 changes: 0 additions & 3 deletions src/Symfony/Component/Config/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
"php": ">=5.3.3",
"symfony/filesystem": "~2.3"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Config\\": "" }
},
Expand Down
4 changes: 4 additions & 0 deletions
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
1 change: 0 additions & 1 deletion src/Symfony/Component/Console/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"php": ">=5.3.3"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/event-dispatcher": "~2.1"
},
"suggest": {
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/Console/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
3 changes: 0 additions & 3 deletions src/Symfony/Component/CssSelector/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
},
"autoload": {
"psr-0": { "Symfony\\Component\\CssSelector\\": "" }
},
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/CssSelector/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
1 change: 0 additions & 1 deletion src/Symfony/Component/Debug/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2",
"symfony/http-foundation": "~2.1"
},
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/Debug/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
1 change: 0 additions & 1 deletion src/Symfony/Component/DependencyInjection/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"php": ">=5.3.3"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/yaml": "~2.1",
"symfony/config": "~2.2"
},
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/DependencyInjection/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
</listeners>
</phpunit>
Loading
0