cmake/Source/CTest/cmCTestBuildAndTestHandler.h

72 lines
1.7 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. */
2021-09-14 00:13:48 +02:00
#pragma once
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-10-30 18:24:19 +01:00
2022-03-29 21:10:50 +02:00
#include <cstddef>
2016-10-30 18:24:19 +01:00
#include <sstream>
#include <string>
#include <vector>
2020-02-01 23:06:01 +01:00
#include "cmCTestGenericHandler.h"
#include "cmDuration.h"
class cmake;
/** \class cmCTestBuildAndTestHandler
* \brief A class that handles ctest -S invocations
*
*/
class cmCTestBuildAndTestHandler : public cmCTestGenericHandler
{
public:
2020-02-01 23:06:01 +01:00
using Superclass = cmCTestGenericHandler;
/*
* 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:
2019-11-11 23:01:05 +01:00
//! 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;
};