summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestScriptHandler.h
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2004-09-06 16:45:14 (GMT)
committerKen Martin <ken.martin@kitware.com>2004-09-06 16:45:14 (GMT)
commitac188aa18b1b4f78c8562ebf2c2b098817186073 (patch)
treecf886e52c734a6104fde0907b613740d3c6a503c /Source/CTest/cmCTestScriptHandler.h
parent0d4cd0436bc1a246cc1556e000bf051fa5558582 (diff)
downloadCMake-ac188aa18b1b4f78c8562ebf2c2b098817186073.zip
CMake-ac188aa18b1b4f78c8562ebf2c2b098817186073.tar.gz
CMake-ac188aa18b1b4f78c8562ebf2c2b098817186073.tar.bz2
broke out part of test scripting into seperate class
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.h')
-rw-r--r--Source/CTest/cmCTestScriptHandler.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h
new file mode 100644
index 0000000..4e02683
--- /dev/null
+++ b/Source/CTest/cmCTestScriptHandler.h
@@ -0,0 +1,95 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+
+#ifndef cmCTestScriptHandler_h
+#define cmCTestScriptHandler_h
+
+
+#include "cmStandardIncludes.h"
+#include "cmListFileCache.h"
+
+class cmMakefile;
+class cmLocalGenerator;
+
+/** \class cmCTestScriptHandler
+ * \brief A class that handles ctest -S invocations
+ *
+ */
+class cmCTestScriptHandler
+{
+public:
+
+ /**
+ * Add a script to run
+ */
+ void AddConfigurationScript(const char *);
+
+ /**
+ * Run a dashboard using a specified confiuration script
+ */
+ int RunConfigurationScript();
+
+ /*
+ * If verbose then more informaiton is printed out
+ */
+ void SetVerbose(bool val) { m_Verbose = val; }
+
+ cmCTestScriptHandler();
+
+private:
+ // reads in a script
+ int ReadInScript(const std::string& total_script_arg);
+
+ // extract vars from the script to set ivars
+ int ExtractVariables();
+
+ // perform a CVS checkout of the source dir
+ int CheckOutSourceDir();
+
+ // perform any extra cvs updates that were requested
+ int PerformExtraUpdates();
+
+ void LocalSleep(unsigned int secondsToWait);
+
+ // backup and restore dirs
+ int BackupDirectories();
+ void RestoreBackupDirectories();
+
+ int RunConfigurationScript(const std::string& script);
+ int RunConfigurationDashboard();
+
+ std::vector<cmStdString> m_ConfigurationScripts;
+
+ bool m_Verbose;
+ bool m_Backup;
+
+ cmStdString m_SourceDir;
+ cmStdString m_BinaryDir;
+ cmStdString m_BackupSourceDir;
+ cmStdString m_BackupBinaryDir;
+ cmStdString m_CTestRoot;
+ cmStdString m_CVSCheckOut;
+ cmStdString m_CTestCmd;
+ cmStdString m_CVSCmd;
+
+ double m_MinimumInterval;
+
+ cmMakefile *m_Makefile;
+ cmLocalGenerator *m_LocalGenerator;
+};
+
+#endif