7#include <boost/filesystem.hpp>
18 std::vector<std::string> names = opt.
GetNames();
22 fCurrentDir = boost::filesystem::current_path().string();
24 auto pChecker = std::make_unique<cbm::qa::checker::Core>();
30 for (
const std::string& name : names) {
32 std::string label = name.substr(0, 9);
34 pChecker->AddVersion(label.c_str(), label.c_str());
38 for (
const std::string& name : names) {
40 pChecker->AddVersion(name.c_str(), name.c_str());
44 std::cerr <<
"Unknown compare type: NotDefined" << std::endl;
47 pChecker->Process(opt.
GetOption().c_str());
57 std::ostringstream cmd;
58 const char* vmworkdir = getenv(
"VMWORKDIR");
59 if (vmworkdir !=
nullptr) {
60 cmd << vmworkdir <<
"/macro/qa/run_ctest_commit.sh";
62 for (
const auto& name : names) {
66 if (!builddir.empty()) {
67 cmd <<
" --build_dir " << builddir;
71 cmd <<
" --current_dir " << currentDir;
73 std::string finalCmd = cmd.str();
74 std::cout <<
"Executing: " << finalCmd << std::endl;
76 int ret = system(finalCmd.c_str());
78 std::cerr <<
"Script failed with return code: " << ret << std::endl;
83 std::cerr <<
"VMWORKDIR not set in environment!" << std::endl;
Class to parse and store command-line arguments.
const std::string & GetOutput() const
Returns the output ROOT file path.
const std::vector< std::string > & GetNames() const
Returns the list of commit hashes or week numbers.
const std::string & GetOption() const
Returns the option for comparison and canvas handling.
ETestType GetCompare() const
Returns the selected comparison type.
const std::string & GetConfig() const
Returns the YAML configuration file path.
const std::string & GetBuilddir() const
Returns the CBMROOT build directory path.
std::string fConfigFileName
Configuration file name.
std::string fOutputFileName
Output file name.
void Citest(const std::vector< std::string > &names, std::string builddir="")
Executes ctest for a given list of commit hashes or week numbers.
std::string fCurrentDir
Current working directory.
Application(ProgramOptions const &opt)
Standard constructor, initialize the application.
@ Commit
Commit-based comparision mode.
@ Weekly
Weekly test comparision mode.