@@ -28,7 +28,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit")) {
2828 // Build a standalone phpunit without symfony/yaml
2929
3030 $ oldPwd = getcwd ();
31- mkdir ($ PHPUNIT_DIR );
31+ @ mkdir ($ PHPUNIT_DIR );
3232 chdir ($ PHPUNIT_DIR );
3333 if (extension_loaded ('openssl ' ) && ini_get ('allow_url_fopen ' )) {
3434 stream_copy_to_stream (fopen ("https://github.com/sebastianbergmann/phpunit/archive/ $ PHPUNIT_VERSION .zip " , 'rb ' ), fopen ("$ PHPUNIT_VERSION .zip " , 'wb ' ));
@@ -41,6 +41,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit")) {
4141 $ zip ->close ();
4242 chdir ("phpunit- $ PHPUNIT_VERSION " );
4343 passthru ("$ COMPOSER remove --no-update symfony/yaml " );
44+ passthru ("$ COMPOSER require --dev --no-update symfony/phpunit-bridge \">=2.8@dev \"" );
4445 passthru ("$ COMPOSER install --prefer-source --no-progress --ansi " );
4546 chdir ($ oldPwd );
4647}
@@ -76,10 +77,13 @@ if ($phpIniMatrix) {
7677if (isset ($ argv [1 ]) && 'symfony ' === $ argv [1 ]) {
7778 // Find Symfony components in plain php for Windows portability
7879
79- $ finder = new RecursiveDirectoryIterator (__DIR__ .'/src/Symfony ' , FilesystemIterator::KEY_AS_FILENAME | FilesystemIterator::UNIX_PATHS );
80+ $ oldPwd = getcwd ();
81+ chdir (__DIR__ );
82+ $ finder = new RecursiveDirectoryIterator ('src/Symfony ' , FilesystemIterator::KEY_AS_FILENAME | FilesystemIterator::UNIX_PATHS );
8083 $ finder = new RecursiveIteratorIterator ($ finder );
8184 $ finder ->setMaxDepth (3 );
8285
86+ $ skippedTests = isset ($ _SERVER ['SYMFONY_PHPUNIT_SKIPPED_TESTS ' ]) ? $ _SERVER ['SYMFONY_PHPUNIT_SKIPPED_TESTS ' ] : false ;
8387 $ runningProcs = array ();
8488
8589 foreach ($ finder as $ file => $ fileInfo ) {
@@ -88,6 +92,10 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
8892
8993 // Run phpunit tests in parallel
9094
95+ if ($ skippedTests ) {
96+ putenv ("SYMFONY_PHPUNIT_SKIPPED_TESTS= $ component/ $ skippedTests " );
97+ }
98+
9199 $ c = ProcessUtils::escapeArgument ($ component );
92100
93101 if ($ proc = proc_open (sprintf ($ cmd , $ c , " > $ c/phpunit.stdout 2> $ c/phpunit.stderr " ), array (), $ pipes )) {
@@ -98,6 +106,7 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
98106 }
99107 }
100108 }
109+ chdir ($ oldPwd );
101110
102111 // Fixes for colors support on appveyor
103112 // See https://github.com/appveyor/ci/issues/373
@@ -139,6 +148,9 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
139148 }
140149 unlink ($ file );
141150 }
151+ if ($ skippedTests ) {
152+ @unlink ("$ component/ $ skippedTests " );
153+ }
142154
143155 if ($ procStatus ) {
144156 $ exit = 1 ;
0 commit comments