Skip to content

Commit

Permalink
simple-phpunit: remove outdated appveryor workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
ostrolucky committed Jun 2, 2018
1 parent f266514 commit 3bcc1dc
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions bin/simple-phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,6 @@ if ($components) {
}
}

// Fixes for colors support on appveyor
// See https://github.com/appveyor/ci/issues/373
$colorFixes = array(
array("S\033[0m\033[0m\033[36m\033[1mS", "E\033[0m\033[0m\033[31m\033[1mE", "I\033[0m\033[0m\033[33m\033[1mI", "F\033[0m\033[0m\033[41m\033[37mF"),
array("SS", "EE", "II", "FF"),
);
$colorFixes[0] = array_merge($colorFixes[0], $colorFixes[0]);
$colorFixes[1] = array_merge($colorFixes[1], $colorFixes[1]);

while ($runningProcs) {
usleep(300000);
$terminatedProcs = array();
Expand All @@ -212,20 +203,7 @@ if ($components) {
foreach ($terminatedProcs as $component => $procStatus) {
foreach (array('out', 'err') as $file) {
$file = "$component/phpunit.std$file";

if ('\\' === DIRECTORY_SEPARATOR) {
$h = fopen($file, 'rb');
while (false !== $line = fgets($h)) {
echo str_replace($colorFixes[0], $colorFixes[1], preg_replace(
'/(\033\[[0-9]++);([0-9]++m)(?:(.)(\033\[0m))?/',
"$1m\033[$2$3$4$4",
$line
));
}
fclose($h);
} else {
readfile($file);
}
readfile($file);
unlink($file);
}

Expand Down

0 comments on commit 3bcc1dc

Please sign in to comment.