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/cmCTestBZR.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/cmCTestBZR.cxx')
-rw-r--r-- | Source/CTest/cmCTestBZR.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx index b42953b..6769ee5 100644 --- a/Source/CTest/cmCTestBZR.cxx +++ b/Source/CTest/cmCTestBZR.cxx @@ -151,22 +151,24 @@ std::string cmCTestBZR::LoadInfo() return rev; } -void cmCTestBZR::NoteOldRevision() +bool cmCTestBZR::NoteOldRevision() { this->OldRevision = this->LoadInfo(); this->Log << "Revision before update: " << this->OldRevision << "\n"; cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: " << this->OldRevision << "\n"); this->PriorRev.Rev = this->OldRevision; + return true; } -void cmCTestBZR::NoteNewRevision() +bool cmCTestBZR::NoteNewRevision() { this->NewRevision = this->LoadInfo(); this->Log << "Revision after update: " << this->NewRevision << "\n"; cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: " << this->NewRevision << "\n"); this->Log << "URL = " << this->URL << "\n"; + return true; } class cmCTestBZR::LogParser : public cmCTestVC::OutputLogger, @@ -386,7 +388,7 @@ bool cmCTestBZR::UpdateImpl() return this->RunUpdateCommand(&bzr_update[0], &out, &err); } -void cmCTestBZR::LoadRevisions() +bool cmCTestBZR::LoadRevisions() { cmCTestLog(this->CTest, HANDLER_OUTPUT, " Gathering version information (one . per revision):\n" @@ -400,7 +402,7 @@ void cmCTestBZR::LoadRevisions() // DoRevision takes care of discarding the information about OldRevision revs = this->OldRevision + ".." + this->NewRevision; } else { - return; + return true; } // Run "bzr log" to get all global revisions of interest. @@ -415,6 +417,7 @@ void cmCTestBZR::LoadRevisions() this->RunChild(bzr_log, &out, &err); } cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl); + return true; } class cmCTestBZR::StatusParser : public cmCTestVC::LineParser @@ -460,7 +463,7 @@ private: } }; -void cmCTestBZR::LoadModifications() +bool cmCTestBZR::LoadModifications() { // Run "bzr status" which reports local modifications. const char* bzr = this->CommandLineTool.c_str(); @@ -468,4 +471,5 @@ void cmCTestBZR::LoadModifications() StatusParser out(this, "status-out> "); OutputLogger err(this->Log, "status-err> "); this->RunChild(bzr_status, &out, &err); + return true; } |