8000 [appveyor] fix ini matrix race conditions · symfony/symfony@8e59d4a · GitHub
[go: up one dir, main page]

Skip to content

Commit 8e59d4a

Browse files
[appveyor] fix ini matrix race conditions
1 parent 8ced3c6 commit 8e59d4a

File tree

2 files changed

+9
-20
lines changed

2 files changed

+9
-20
lines changed

appveyor.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ init:
1313
- SET SYMFONY_DEPRECATIONS_HELPER=weak
1414
- SET PHP=1
1515
- SET ANSICON=121x90 (121x90)
16-
- SET PHP_INI_MATRIX=php.ini-min php.ini-max
1716
- SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped
1817

1918
install:
@@ -56,4 +55,9 @@ install:
5655

5756
test_script:
5857
- cd c:\projects\symfony
59-
- php phpunit symfony --exclude-group benchmark,intl-data
58+
- SET X=0
59+
- copy /Y c:\php\php.ini-min c:\php\php.ini
60+
- php phpunit symfony --exclude-group benchmark,intl-data || SET X=1
61+
- copy /Y c:\php\php.ini-max c:\php\php.ini
62+
- php phpunit symfony --exclude-group benchmark,intl-data || SET X=1
63+
- exit %X%

phpunit

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,10 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
7676
$cmd[0] = sprintf('%s %s --colors=always', $PHP, ProcessUtils::escapeArgument("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit"));
7777
$cmd = str_replace('%', '%%', implode(' ', $cmd)).' %1$s';
7878

79-
$phpIniMatrix = isset($_SERVER['PHP_INI_MATRIX']) ? explode(' ', $_SERVER['PHP_INI_MATRIX']) : array();
80-
if ($phpIniMatrix) {
81-
if ('\\' !== DIRECTORY_SEPARATOR) {
82-
echo "Error: PHP_INI_MATRIX is a Windows-only feature.\n";
83-
exit(1);
84-
}
85-
86-
$phpDir = ProcessUtils::escapeArgument(dirname(`where.exe php`));
87-
88-
$newCmd = 'cmd /v:on /d /c "(SET X=0';
89-
foreach ($phpIniMatrix as $iniFile) {
90-
$newCmd .= " & copy /Y $phpDir\\$iniFile $phpDir\\php.ini & echo. & echo Running tests with $iniFile: & ($cmd || SET X=1)";
91-
}
92-
$cmd = $newCmd .= ' & exit !X!)%2$s"';
79+
if ('\\' === DIRECTORY_SEPARATOR) {
80+
$cmd = 'cmd /v:on /d /c "('.$cmd.')%2$s"';
9381
} else {
94-
$cmd .= ' %2$s';
82+
$cmd .= '%2$s';
9583
}
9684

9785
if (isset($argv[1]) && 'symfony' === $argv[1]) {
@@ -168,9 +156,6 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
168156
}
169157
unlink($file);
170158
}
171-
if ($skippedTests) {
172-
@unlink("$component/$skippedTests");
173-
}
174159

175160
if ($procStatus) {
176161
$exit = 1;

0 31CE commit comments

Comments
 (0)
0