diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-02-17 15:51:52 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-02-17 15:51:52 (GMT) |
commit | 8fe168651033cb1374b36424ed2458db5d56ab27 (patch) | |
tree | d39ea4af235887acd1f907cb2d1a2948273e6307 /Source/cmCTest.h | |
parent | ad5115d00f4753970187739c20360d922b36e7b1 (diff) | |
download | CMake-8fe168651033cb1374b36424ed2458db5d56ab27.zip CMake-8fe168651033cb1374b36424ed2458db5d56ab27.tar.gz CMake-8fe168651033cb1374b36424ed2458db5d56ab27.tar.bz2 |
ENH: Cleanups and add CTEST_START command
Diffstat (limited to 'Source/cmCTest.h')
-rw-r--r-- | Source/cmCTest.h | 104 |
1 files changed, 55 insertions, 49 deletions
diff --git a/Source/cmCTest.h b/Source/cmCTest.h index adb8d9b..3674f01 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -38,7 +38,7 @@ public: /** * Initialize and finalize testing */ - int Initialize(); + int Initialize(const char* binary_dir); void Finalize(); /** @@ -110,53 +110,25 @@ public: //! Set the notes files to be created. void SetNotesFiles(const char* notes); - std::string m_ConfigType; - bool m_Verbose; - bool m_DartMode; - - bool m_ForceNewCTestProcess; - - bool m_RunConfigurationScript; - - enum { - EXPERIMENTAL, - NIGHTLY, - CONTINUOUS - }; - - // provide some more detailed info on the return code for ctest - enum { - UPDATE_ERRORS = 0x01, - CONFIGURE_ERRORS = 0x02, - BUILD_ERRORS = 0x04, - TEST_ERRORS = 0x08, - MEMORY_ERRORS = 0x10, - COVERAGE_ERRORS = 0x20 - }; - - int GenerateNotesFile(const char* files); + static void PopulateCustomVector(cmMakefile* mf, const char* definition, + tm_VectorOfStrings& vec); + static void PopulateCustomInteger(cmMakefile* mf, const char* def, int& val); + ///! Get the current time as string + std::string CurrentTime(); + + ///! Open file in the output directory and set the stream bool OpenOutputFile(const std::string& path, const std::string& name, cmGeneratedFileStream& stream, bool compress = false); + + ///! Convert string to something that is XML safe static std::string MakeXMLSafe(const std::string&); - static std::string MakeURLSafe(const std::string&); - - /* - * return the current tag - */ - std::string GetCurrentTag(); - ///! Get the current time as string - std::string CurrentTime(); - ///! Should we only show what we would do? bool GetShowOnly(); - ///! Are we producing XML - bool GetProduceXML(); - //! Start CTest XML output file void StartXML(std::ostream& ostr); @@ -169,25 +141,60 @@ public: int* retVal, const char* dir, bool verbose, int timeout, std::ofstream& ofs); - static void PopulateCustomVector(cmMakefile* mf, const char* definition, - tm_VectorOfStrings& vec); - static void PopulateCustomInteger(cmMakefile* mf, const char* def, int& val); + /* + * return the current tag + */ + std::string GetCurrentTag(); - std::string GetToplevelPath(); + //! Get the path to the build tree + std::string GetBinaryDir(); + //! Get the short path to the file. This means if the file is in binary or + //source directory, it will become /.../relative/path/to/file + std::string GetShortPathToFile(const char* fname); + + //! Get the path to CTest + const char* GetCTestExecutable() { return m_CTestSelf.c_str(); } + + enum { + EXPERIMENTAL, + NIGHTLY, + CONTINUOUS + }; + + // provide some more detailed info on the return code for ctest + enum { + UPDATE_ERRORS = 0x01, + CONFIGURE_ERRORS = 0x02, + BUILD_ERRORS = 0x04, + TEST_ERRORS = 0x08, + MEMORY_ERRORS = 0x10, + COVERAGE_ERRORS = 0x20 + }; + + ///! Are we producing XML + bool GetProduceXML(); + void SetProduceXML(bool v); + //! Run command specialized for tests. Returns process status and retVal is // return value or exception. int RunTest(std::vector<const char*> args, std::string* output, int *retVal, std::ostream* logfile); - //! Get the path to CTest - const char* GetCTestExecutable() { return m_CTestSelf.c_str(); } +private: - //! Get the short path to the file. This means if the file is in binary or - //source directory, it will become /.../relative/path/to/file - std::string GetShortPathToFile(const char* fname); + std::string m_ConfigType; + bool m_Verbose; + bool m_ProduceXML; -private: + bool m_ForceNewCTestProcess; + + bool m_RunConfigurationScript; + + int GenerateNotesFile(const char* files); + + static std::string MakeURLSafe(const std::string&); + // these are helper classes typedef std::map<cmStdString,cmCTestGenericHandler*> t_TestingHandlers; t_TestingHandlers m_TestingHandlers; @@ -212,7 +219,6 @@ private: //! Map of configuration properties typedef std::map<cmStdString, cmStdString> tm_DartConfigurationMap; - std::string m_ToplevelPath; tm_DartConfigurationMap m_DartConfiguration; int m_Tests[LAST_TEST]; |