summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestLaunch.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestLaunch.h')
-rw-r--r--Source/CTest/cmCTestLaunch.h55
1 files changed, 11 insertions, 44 deletions
diff --git a/Source/CTest/cmCTestLaunch.h b/Source/CTest/cmCTestLaunch.h
index 33ff82c..d18f66d 100644
--- a/Source/CTest/cmCTestLaunch.h
+++ b/Source/CTest/cmCTestLaunch.h
@@ -4,13 +4,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include <set>
#include <string>
#include <vector>
-#include "cmsys/RegularExpression.hxx"
+#include "cmCTestLaunchReporter.h"
-class cmXMLElement;
+namespace cmsys {
+class RegularExpression;
+}
/** \class cmCTestLaunch
* \brief Launcher for make rules to report results for ctest
@@ -35,70 +36,36 @@ private:
int Run();
void RunChild();
- // Methods to check the result of the real command.
- bool IsError() const;
+ // Method to check the result of the real command.
bool CheckResults();
- // Launcher options specified before the real command.
- std::string OptionOutput;
- std::string OptionSource;
- std::string OptionLanguage;
- std::string OptionTargetName;
- std::string OptionTargetType;
- std::string OptionBuildDir;
- std::string OptionFilterPrefix;
+ // Parse out launcher-specific options specified before the real command.
bool ParseArguments(int argc, const char* const* argv);
// The real command line appearing after launcher arguments.
int RealArgC;
const char* const* RealArgV;
- std::string CWD;
// The real command line after response file expansion.
std::vector<std::string> RealArgs;
void HandleRealArg(const char* arg);
- // A hash of the real command line is unique and unlikely to collide.
- std::string LogHash;
- void ComputeFileNames();
-
- bool Passthru;
struct cmsysProcess_s* Process;
- int ExitCode;
- // Temporary log files for stdout and stderr of real command.
- std::string LogDir;
- std::string LogOut;
- std::string LogErr;
+ // Whether or not any data have been written to stdout or stderr.
bool HaveOut;
bool HaveErr;
- // Labels associated with the build rule.
- std::set<std::string> Labels;
- void LoadLabels();
- bool SourceMatches(std::string const& lhs, std::string const& rhs);
-
- // Regular expressions to match warnings and their exceptions.
+ // Load custom rules to match warnings and their exceptions.
bool ScrapeRulesLoaded;
- std::vector<cmsys::RegularExpression> RegexWarning;
- std::vector<cmsys::RegularExpression> RegexWarningSuppress;
void LoadScrapeRules();
void LoadScrapeRules(const char* purpose,
std::vector<cmsys::RegularExpression>& regexps);
bool ScrapeLog(std::string const& fname);
- bool Match(std::string const& line,
- std::vector<cmsys::RegularExpression>& regexps);
- bool MatchesFilterPrefix(std::string const& line) const;
-
- // Methods to generate the xml fragment.
- void WriteXML();
- void WriteXMLAction(cmXMLElement&);
- void WriteXMLCommand(cmXMLElement&);
- void WriteXMLResult(cmXMLElement&);
- void WriteXMLLabels(cmXMLElement&);
- void DumpFileToXML(cmXMLElement&, const char* tag, std::string const& fname);
+
+ // Helper class to generate the xml fragment.
+ cmCTestLaunchReporter Reporter;
// Configuration
void LoadConfig();
- std::string SourceDir;
};