cmake/Source/CTest/cmCTestBuildAndTestHandler.h

75 lines
1.8 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#ifndef cmCTestBuildAndTestHandler_h
#define cmCTestBuildAndTestHandler_h
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-10-30 18:24:19 +01:00
#include "cmCTestGenericHandler.h"
2018-04-23 21:13:27 +02:00
#include "cmDuration.h"
2016-10-30 18:24:19 +01:00
#include <sstream>
#include <stddef.h>
#include <string>
#include <vector>
class cmake;
/** \class cmCTestBuildAndTestHandler
* \brief A class that handles ctest -S invocations
*
*/
class cmCTestBuildAndTestHandler : public cmCTestGenericHandler
{
public:
2017-04-14 19:02:05 +02:00
typedef cmCTestGenericHandler Superclass;
/*
* The main entry point for this class
*/
2018-01-26 17:06:56 +01:00
int ProcessHandler() override;
//! Set all the build and test arguments
2018-01-26 17:06:56 +01:00
int ProcessCommandLineArguments(
const std::string& currentArg, size_t& idx,
const std::vector<std::string>& allArgs) override;
/*
* Get the output variable
*/
const char* GetOutput();
2013-03-16 19:13:01 +02:00
cmCTestBuildAndTestHandler();
2018-01-26 17:06:56 +01:00
void Initialize() override;
protected:
///! Run CMake and build a test and then run it as a single test.
int RunCMakeAndTest(std::string* output);
2016-07-09 11:21:54 +02:00
int RunCMake(std::string* outstring, std::ostringstream& out,
2017-07-20 19:35:53 +02:00
std::string& cmakeOutString, cmake* cm);
2013-03-16 19:13:01 +02:00
2016-07-09 11:21:54 +02:00
std::string Output;
2016-07-09 11:21:54 +02:00
std::string BuildGenerator;
std::string BuildGeneratorPlatform;
std::string BuildGeneratorToolset;
std::vector<std::string> BuildOptions;
2016-07-09 11:21:54 +02:00
bool BuildTwoConfig;
std::string BuildMakeProgram;
std::string ConfigSample;
std::string SourceDir;
std::string BinaryDir;
std::string BuildProject;
std::string TestCommand;
bool BuildNoClean;
std::string BuildRunDir;
std::string ExecutableDirectory;
std::vector<std::string> TestCommandArgs;
std::vector<std::string> BuildTargets;
2016-07-09 11:21:54 +02:00
bool BuildNoCMake;
2018-04-23 21:13:27 +02:00
cmDuration Timeout;
};
#endif