CTest: output colored by default will fail many internal tests
I fail most of the 1001 tests of the current v3.21++ and so, with command:
/usr/src/cmake/cmake-build$ make test ARGS='--rerun-failed --output-on-failure --stop-on-failure --color=off'
because it has many ...
expect-err> ^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
...
actual-err> ^[0mCMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
...
the color escape characters have been insterted by ctest.
I naively fix this by adding some ".*" regexp in the actual test text... but they are so many! now I am sure there is an option to overide this obscure setting... and... yes! looking at !2577 (merged), I tried:
make test ARGS='--rerun-failed --output-on-failure --stop-on-failure' CLICOLOR=0 CLICOLOR_FORCE=0
which will resolve this problem for me. But should this be automated more robustly or/and those environment variable more documented?