Last modified: 2013-11-13 09:10:47 UTC
PHPUnit, on user request, can emits colored output using ANSI escape sequences. It seems they are no more supported by modern Windows OSes ... Two way to fix this issue: - using our bootstrapper disable the color options for Windows platform - fix up PHPUnit to detect Windows.
Is the problem that it *should* output colors on Windows but doesn't (fails to detect support -> false negative) or that it *should not* output colors on Windows but does (fails to detect lack of support -> false positive)?
It should not, but does, resultting in PASSED or FAILED being surrounded by garbage obfuscating the result.
Here's an upstream bug requesting that phpunit check for tty output at least, which was closed out apparently unfixed on the basis that color has to be explicitly turned on (so someone turning it on and then redirecting to a file must want it in the file, right?): https://github.com/sebastianbergmann/phpunit/issues/234 Sounds like either our runner needs to detect things and pass in the option, or PHPUnit upstream needs modification to allow a '--color=auto' or colors="auto" option or something to let it autodetect terminal availability. Offhand I forget whether posix_isatty() will be present and returning true on Windows, might also need to just short-circuit with an OS check there.
(In reply to comment #3) > Offhand I forget whether posix_isatty() will be present and returning true on > Windows, might also need to just short-circuit with an OS check there. posix_isatty() will always be present, since we have a fallback in Maintenance.php :)
I have redone my patch to take care of wfIsWindows(). See r94673.
This bug is upstream, PHPUnit needs to detect an ANSI.SYS driver is loaded to eventually output color. My workaround unconditionally disable color output, so it should no more be an issue for windows user. I think this bug should be closed now.
Marking as WONTFIX. We have a workaround to disable color output if running under windows.
I meant FIXED by r94673 sorry.
Might be an issue again since Jeroen proposed to disable color by default with https://gerrit.wikimedia.org/r/#/c/88984/ Reopening.
Moving bug back in the pool.