ENH: fix color output inside of ctest runs

This commit is contained in:
Ken Martin 2006-07-21 14:58:13 -04:00
parent ad748ce26e
commit 299bbcad86
2 changed files with 6 additions and 1 deletions

View File

@ -289,6 +289,10 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag,
{ {
this->BlockTestErrorDiagnostics(); this->BlockTestErrorDiagnostics();
} }
else
{
cmSystemTools::PutEnv("CTEST_INTERACTIVE_DEBUG_MODE=1");
}
this->BinaryDir = binary_dir; this->BinaryDir = binary_dir;
cmSystemTools::ConvertToUnixSlashes(this->BinaryDir); cmSystemTools::ConvertToUnixSlashes(this->BinaryDir);

View File

@ -2554,7 +2554,8 @@ int cmake::ExecuteEchoColor(std::vector<std::string>& args)
// likely no. // likely no.
int assumeTTY = cmsysTerminal_Color_AssumeTTY; int assumeTTY = cmsysTerminal_Color_AssumeTTY;
if(cmSystemTools::GetEnv("DART_TEST_FROM_DART") || if(cmSystemTools::GetEnv("DART_TEST_FROM_DART") ||
cmSystemTools::GetEnv("DASHBOARD_TEST_FROM_CTEST")) cmSystemTools::GetEnv("DASHBOARD_TEST_FROM_CTEST") ||
cmSystemTools::GetEnv("CTEST_INTERACTIVE_DEBUG_MODE"))
{ {
// Avoid printing color escapes during dashboard builds. // Avoid printing color escapes during dashboard builds.
assumeTTY = 0; assumeTTY = 0;