summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestP4.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-15 18:58:40 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-16 18:19:26 (GMT)
commitef399f9bc6b8e2ff917a5f2809346fb81fd954ae (patch)
tree329a270ad32f04ebba493ea9abe5486fd74898a1 /Source/CTest/cmCTestP4.cxx
parentbb4730dc5add8c5ac54b41efa5375189636429f3 (diff)
downloadCMake-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/cmCTestP4.cxx')
-rw-r--r--Source/CTest/cmCTestP4.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index 41b45a8..4f78876 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -369,24 +369,26 @@ std::string cmCTestP4::GetWorkingRevision()
return rev;
}
-void cmCTestP4::NoteOldRevision()
+bool cmCTestP4::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 cmCTestP4::NoteNewRevision()
+bool cmCTestP4::NoteNewRevision()
{
this->NewRevision = this->GetWorkingRevision();
cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
<< this->NewRevision << "\n");
+ return true;
}
-void cmCTestP4::LoadRevisions()
+bool cmCTestP4::LoadRevisions()
{
std::vector<char const*> p4_changes;
SetP4Options(p4_changes);
@@ -399,7 +401,7 @@ void cmCTestP4::LoadRevisions()
if (this->OldRevision == "<unknown>" || this->NewRevision == "<unknown>") {
cmCTestLog(this->CTest, HANDLER_OUTPUT, " At least one of the revisions "
<< "is unknown. No repository changes will be reported.\n");
- return;
+ return false;
}
range.append("@")
@@ -418,7 +420,7 @@ void cmCTestP4::LoadRevisions()
this->RunChild(&p4_changes[0], &out, &err);
if (ChangeLists.empty()) {
- return;
+ return true;
}
// p4 describe -s ...@1111111,2222222
@@ -435,9 +437,10 @@ void cmCTestP4::LoadRevisions()
OutputLogger errDescribe(this->Log, "p4_describe-err> ");
this->RunChild(&p4_describe[0], &outDescribe, &errDescribe);
}
+ return true;
}
-void cmCTestP4::LoadModifications()
+bool cmCTestP4::LoadModifications()
{
std::vector<char const*> p4_diff;
SetP4Options(p4_diff);
@@ -453,6 +456,7 @@ void cmCTestP4::LoadModifications()
DiffParser out(this, "p4_diff-out> ");
OutputLogger err(this->Log, "p4_diff-err> ");
this->RunChild(&p4_diff[0], &out, &err);
+ return true;
}
bool cmCTestP4::UpdateCustom(const std::string& custom)