diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-01 19:57:55 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-01 19:57:55 (GMT) |
commit | 7acfc4dc3cd8c5865ff55ed94e210776cff6876b (patch) | |
tree | f68de1f9e3885b48f37857dfaf3b5120ca93072d /Source/CTest/cmCTestTestHandler.cxx | |
parent | eca18a2e9fcd9a33dce6d87bcca86de236598ae1 (diff) | |
download | CMake-7acfc4dc3cd8c5865ff55ed94e210776cff6876b.zip CMake-7acfc4dc3cd8c5865ff55ed94e210776cff6876b.tar.gz CMake-7acfc4dc3cd8c5865ff55ed94e210776cff6876b.tar.bz2 |
ENH: Start adding support for CTest testfiles
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 81bd145..4c6e1da 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -798,14 +798,24 @@ std::string cmCTestTestHandler::FindTheExecutable(const char *exe) //---------------------------------------------------------------------- void cmCTestTestHandler::GetListOfTests(tm_ListOfTests* testlist) { - // does the DartTestfile.txt exist ? - if(!cmSystemTools::FileExists("DartTestfile.txt")) + const char* testFilename = 0; + if( cmSystemTools::FileExists("CTestTestfile.cmake") ) + { + // does the CTestTestfile.cmake exist ? + testFilename = "CTestTestfile.cmake"; + } + else if( cmSystemTools::FileExists("DartTestfile.txt") ) + { + // does the DartTestfile.txt exist ? + testFilename = "DartTestfile.txt"; + } + else { return; } // parse the file - std::ifstream fin("DartTestfile.txt"); + std::ifstream fin(testFilename); if(!fin) { return; @@ -815,7 +825,7 @@ void cmCTestTestHandler::GetListOfTests(tm_ListOfTests* testlist) cmsys::RegularExpression ereg(this->m_ExcludeRegExp.c_str()); cmListFileCache cache; - cmListFile* listFile = cache.GetFileCache("DartTestfile.txt", false); + cmListFile* listFile = cache.GetFileCache(testFilename, false); for(std::vector<cmListFileFunction>::const_iterator f = listFile->m_Functions.begin(); f != listFile->m_Functions.end(); ++f) { |