diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-30 16:36:18 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-30 16:36:18 (GMT) |
commit | 920aef76e0979c44a5e7bc50de40b7d50329c8da (patch) | |
tree | 1fc01b23157fa255a83cb74300add7f924a0ba3f | |
parent | a828368232fe08e0065c26e07c38f4dafc78aadf (diff) | |
download | CMake-920aef76e0979c44a5e7bc50de40b7d50329c8da.zip CMake-920aef76e0979c44a5e7bc50de40b7d50329c8da.tar.gz CMake-920aef76e0979c44a5e7bc50de40b7d50329c8da.tar.bz2 |
ENH: Add support for notes in Testing/Notes subdirectory. This way test can write notes that will be reported
-rw-r--r-- | Source/cmCTest.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 6832204..6a6176c 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2954,6 +2954,31 @@ int cmCTest::ProcessTests() res |= CTEST_MEMORY_ERRORS; } } + if ( !notest ) + { + std::string notes_dir = m_ToplevelPath + "/Testing/Notes"; + if ( cmSystemTools::FileIsDirectory(notes_dir.c_str()) ) + { + cmsys::Directory d; + d.Load(notes_dir.c_str()); + unsigned long cc; + for ( cc = 0; cc < d.GetNumberOfFiles(); cc ++ ) + { + const char* file = d.GetFile(cc); + std::string fullname = notes_dir + "/" + file; + if ( cmSystemTools::FileExists(fullname.c_str()) && + !cmSystemTools::FileIsDirectory(fullname.c_str()) ) + { + if ( m_NotesFiles.size() > 0 ) + { + m_NotesFiles += ";"; + } + m_NotesFiles += fullname; + m_Tests[NOTES_TEST] = 1; + } + } + } + } if ( m_Tests[NOTES_TEST] || m_Tests[ALL_TEST] ) { this->UpdateCTestConfiguration(); |