diff options
author | Brad King <brad.king@kitware.com> | 2017-02-15 18:58:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-16 18:19:26 (GMT) |
commit | ef399f9bc6b8e2ff917a5f2809346fb81fd954ae (patch) | |
tree | 329a270ad32f04ebba493ea9abe5486fd74898a1 /Source/CTest/cmCTestGIT.cxx | |
parent | bb4730dc5add8c5ac54b41efa5375189636429f3 (diff) | |
download | CMake-ef399f9bc6b8e2ff917a5f2809346fb81fd954ae.zip CMake-ef399f9bc6b8e2ff917a5f2809346fb81fd954ae.tar.gz CMake-ef399f9bc6b8e2ff917a5f2809346fb81fd954ae.tar.bz2 |
ctest_update: Refactor internal APIs to support more failure cases
Thread failure of VC tool commands through more APIs so that we can
detect when they fail. Defer updating of the individual VC tool usage
the future and just return true from them for now.
Diffstat (limited to 'Source/CTest/cmCTestGIT.cxx')
-rw-r--r-- | Source/CTest/cmCTestGIT.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx index d30f6b3..9c53aa1 100644 --- a/Source/CTest/cmCTestGIT.cxx +++ b/Source/CTest/cmCTestGIT.cxx @@ -67,19 +67,21 @@ std::string cmCTestGIT::GetWorkingRevision() return rev; } -void cmCTestGIT::NoteOldRevision() +bool cmCTestGIT::NoteOldRevision() { this->OldRevision = this->GetWorkingRevision(); cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: " << this->OldRevision << "\n"); this->PriorRev.Rev = this->OldRevision; + return true; } -void cmCTestGIT::NoteNewRevision() +bool cmCTestGIT::NoteNewRevision() { this->NewRevision = this->GetWorkingRevision(); cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: " << this->NewRevision << "\n"); + return true; } std::string cmCTestGIT::FindGitDir() @@ -607,7 +609,7 @@ private: char const cmCTestGIT::CommitParser::SectionSep[SectionCount] = { '\n', '\n', '\0' }; -void cmCTestGIT::LoadRevisions() +bool cmCTestGIT::LoadRevisions() { // Use 'git rev-list ... | git diff-tree ...' to get revisions. std::string range = this->OldRevision + ".." + this->NewRevision; @@ -634,9 +636,10 @@ void cmCTestGIT::LoadRevisions() out.Process("", 1); cmsysProcess_Delete(cp); + return true; } -void cmCTestGIT::LoadModifications() +bool cmCTestGIT::LoadModifications() { const char* git = this->CommandLineTool.c_str(); @@ -660,4 +663,5 @@ void cmCTestGIT::LoadModifications() ci != out.Changes.end(); ++ci) { this->DoModification(PathModified, ci->Path); } + return true; } |