cmCTestBuildHandler: Store path of temporary log file
This commit is contained in:
parent
8dfb1f40b7
commit
8d4743b9e9
@ -302,6 +302,8 @@ int cmCTestBuildHandler::ProcessHandler()
|
||||
"Cannot create build log file" << std::endl);
|
||||
}
|
||||
|
||||
this->LogFileName = ofs.GetTempName();
|
||||
|
||||
// Create lists of regular expression strings for errors, error exceptions,
|
||||
// warnings and warning exceptions.
|
||||
std::vector<std::string>::size_type cc;
|
||||
@ -884,8 +886,7 @@ bool cmCTestBuildHandler::RunMakeCommand(std::string const& command,
|
||||
// Use temporary BuildLog file to populate this error for
|
||||
// CDash.
|
||||
ofs.flush();
|
||||
reporter.LogOut = this->LogFileNames["Build"];
|
||||
reporter.LogOut += ".tmp";
|
||||
reporter.LogOut = this->LogFileName;
|
||||
reporter.WriteXML();
|
||||
}
|
||||
} else {
|
||||
|
@ -145,6 +145,7 @@ private:
|
||||
|
||||
bool UseCTestLaunch = false;
|
||||
std::string CTestLaunchDir;
|
||||
std::string LogFileName;
|
||||
class LaunchHelper;
|
||||
|
||||
friend class LaunchHelper;
|
||||
|
@ -3,9 +3,9 @@
|
||||
#include "cmCTestGenericHandler.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "cmCTest.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
|
||||
cmCTestGenericHandler::cmCTestGenericHandler(cmCTest* ctest)
|
||||
@ -72,8 +72,6 @@ bool cmCTestGenericHandler::StartLogFile(char const* name,
|
||||
ostr << "_" << this->CTest->GetCurrentTag();
|
||||
}
|
||||
ostr << ".log";
|
||||
this->LogFileNames[name] =
|
||||
cmStrCat(this->CTest->GetBinaryDir(), "/Testing/Temporary/", ostr.str());
|
||||
if (!this->CTest->OpenOutputFile("Temporary", ostr.str(), xofs)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot create log file: " << ostr.str() << std::endl);
|
||||
|
@ -4,9 +4,6 @@
|
||||
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "cmCTest.h"
|
||||
#include "cmSystemTools.h"
|
||||
|
||||
@ -52,8 +49,6 @@ public:
|
||||
cmCTestGenericHandler(cmCTest* ctest);
|
||||
virtual ~cmCTestGenericHandler();
|
||||
|
||||
using t_StringToString = std::map<std::string, std::string>;
|
||||
|
||||
void SetSubmitIndex(int idx) { this->SubmitIndex = idx; }
|
||||
int GetSubmitIndex() { return this->SubmitIndex; }
|
||||
|
||||
@ -75,7 +70,6 @@ protected:
|
||||
unsigned long TestLoad = 0;
|
||||
cmSystemTools::OutputOption HandlerVerbose = cmSystemTools::OUTPUT_NONE;
|
||||
cmCTest* CTest;
|
||||
t_StringToString LogFileNames;
|
||||
cmake* CMake = nullptr;
|
||||
|
||||
int SubmitIndex = 0;
|
||||
|
@ -665,7 +665,6 @@ bool cmCTest::OpenOutputFile(std::string const& path, std::string const& name,
|
||||
}
|
||||
}
|
||||
std::string filename = testingDir + "/" + name;
|
||||
stream.SetTempExt("tmp");
|
||||
stream.Open(filename);
|
||||
if (!stream) {
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
|
@ -147,6 +147,11 @@ public:
|
||||
*/
|
||||
void SetTempExt(std::string const& ext);
|
||||
|
||||
/**
|
||||
* Get the name of the temporary file.
|
||||
*/
|
||||
std::string const& GetTempName() const { return this->TempName; }
|
||||
|
||||
/**
|
||||
* Write a specific string using an alternate encoding.
|
||||
* Afterward, the original encoding is restored.
|
||||
|
Loading…
Reference in New Issue
Block a user