MCPcopy Create free account
hub / github.com/Kitware/CMake / StartLogFile

Method StartLogFile

Source/cmCTest.cxx:3605–3631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3603}
3604
3605bool cmCTest::StartLogFile(char const* name, int submitIndex,
3606 cmGeneratedFileStream& xofs)
3607{
3608 if (!name) {
3609 cmCTestLog(this, ERROR_MESSAGE,
3610 "Cannot create log file without providing the name\n");
3611 return false;
3612 }
3613 if (submitIndex == 0) {
3614 submitIndex = this->Impl->SubmitIndex;
3615 }
3616 std::ostringstream ostr;
3617 ostr << "Last" << name;
3618 if (submitIndex > 0) {
3619 ostr << "_" << submitIndex;
3620 }
3621 if (!this->Impl->CurrentTag.empty()) {
3622 ostr << "_" << this->Impl->CurrentTag;
3623 }
3624 ostr << ".log";
3625 if (!this->OpenOutputFile("Temporary", ostr.str(), xofs)) {
3626 cmCTestLog(this, ERROR_MESSAGE,
3627 "Cannot create log file: " << ostr.str() << '\n');
3628 return false;
3629 }
3630 return true;
3631}
3632
3633cmInstrumentation& cmCTest::GetInstrumentation()
3634{

Callers

nothing calls this directly

Calls 3

OpenOutputFileMethod · 0.95
strMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected