ENH: Add method so that ctest handlers and commands can add notes
This commit is contained in:
parent
26e8ff9ab6
commit
4e49c3bf6e
Source
@ -236,6 +236,7 @@ cmCTest::cmCTest()
|
|||||||
m_TimeOut = 0;
|
m_TimeOut = 0;
|
||||||
m_CompressXMLFiles = false;
|
m_CompressXMLFiles = false;
|
||||||
m_CTestConfigFile = "";
|
m_CTestConfigFile = "";
|
||||||
|
m_SuppressUpdatingCTestConfiguration = false;
|
||||||
int cc;
|
int cc;
|
||||||
for ( cc=0; cc < cmCTest::LAST_TEST; cc ++ )
|
for ( cc=0; cc < cmCTest::LAST_TEST; cc ++ )
|
||||||
{
|
{
|
||||||
@ -373,6 +374,10 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag)
|
|||||||
|
|
||||||
bool cmCTest::UpdateCTestConfiguration()
|
bool cmCTest::UpdateCTestConfiguration()
|
||||||
{
|
{
|
||||||
|
if ( m_SuppressUpdatingCTestConfiguration )
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
std::string fileName = m_CTestConfigFile;
|
std::string fileName = m_CTestConfigFile;
|
||||||
if ( fileName.empty() )
|
if ( fileName.empty() )
|
||||||
{
|
{
|
||||||
@ -1032,6 +1037,19 @@ int cmCTest::GenerateCTestNotesOutput(std::ostream& os, const cmCTest::tm_Vector
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int cmCTest::GenerateNotesFile(const std::vector<cmStdString> &files)
|
||||||
|
{
|
||||||
|
cmGeneratedFileStream ofs;
|
||||||
|
if ( !this->OpenOutputFile(m_CurrentTag, "Notes.xml", ofs) )
|
||||||
|
{
|
||||||
|
std::cerr << "Cannot open notes file" << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
this->GenerateCTestNotesOutput(ofs, files);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int cmCTest::GenerateNotesFile(const char* cfiles)
|
int cmCTest::GenerateNotesFile(const char* cfiles)
|
||||||
{
|
{
|
||||||
if ( !cfiles )
|
if ( !cfiles )
|
||||||
@ -1049,15 +1067,7 @@ int cmCTest::GenerateNotesFile(const char* cfiles)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmGeneratedFileStream ofs;
|
return this->GenerateNotesFile(files);
|
||||||
if ( !this->OpenOutputFile(m_CurrentTag, "Notes.xml", ofs) )
|
|
||||||
{
|
|
||||||
std::cerr << "Cannot open notes file" << std::endl;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->GenerateCTestNotesOutput(ofs, files);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
||||||
|
@ -196,6 +196,16 @@ public:
|
|||||||
|
|
||||||
//! Make string safe to be send as an URL
|
//! Make string safe to be send as an URL
|
||||||
static std::string MakeURLSafe(const std::string&);
|
static std::string MakeURLSafe(const std::string&);
|
||||||
|
|
||||||
|
//! Should ctect configuration be updated. When using new style ctest script,
|
||||||
|
// this should be true.
|
||||||
|
void SetSuppressUpdatingCTestConfiguration(bool val)
|
||||||
|
{
|
||||||
|
m_SuppressUpdatingCTestConfiguration = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Create XML file that contains all the notes specified
|
||||||
|
int GenerateNotesFile(const std::vector<cmStdString> &files);
|
||||||
private:
|
private:
|
||||||
std::string m_ConfigType;
|
std::string m_ConfigType;
|
||||||
bool m_Verbose;
|
bool m_Verbose;
|
||||||
@ -291,6 +301,7 @@ private:
|
|||||||
///! Find the running cmake
|
///! Find the running cmake
|
||||||
void FindRunningCMake(const char* arg0);
|
void FindRunningCMake(const char* arg0);
|
||||||
|
|
||||||
|
bool m_SuppressUpdatingCTestConfiguration;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user