mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-28 01:51:02 -06:00
Merge topic 'ctest-build-and-test'
2a5ecbdf1actest: Restore cleanup of load_command plugins8e4fdafd0acmCTestBuildAndTest: Improve RunCMake method return type Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9916
This commit is contained in:
@@ -33,7 +33,7 @@ cmCTestBuildAndTest::cmCTestBuildAndTest(cmCTest* ctest)
|
||||
{
|
||||
}
|
||||
|
||||
int cmCTestBuildAndTest::RunCMake(cmake* cm)
|
||||
bool cmCTestBuildAndTest::RunCMake(cmake* cm)
|
||||
{
|
||||
std::vector<std::string> args;
|
||||
args.push_back(cmSystemTools::GetCMakeCommand());
|
||||
@@ -69,18 +69,18 @@ int cmCTestBuildAndTest::RunCMake(cmake* cm)
|
||||
if (cm->Run(args) != 0) {
|
||||
std::cout << "======== End CMake output ======\n";
|
||||
std::cout << "Error: cmake execution failed\n";
|
||||
return 1;
|
||||
return false;
|
||||
}
|
||||
// do another config?
|
||||
if (this->BuildTwoConfig) {
|
||||
if (cm->Run(args) != 0) {
|
||||
std::cout << "======== End CMake output ======\n";
|
||||
std::cout << "Error: cmake execution failed\n";
|
||||
return 1;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
std::cout << "======== End CMake output ======\n";
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cmCTestBuildAndTest::RunTest(std::vector<std::string> const& argv,
|
||||
@@ -230,7 +230,7 @@ int cmCTestBuildAndTest::Run()
|
||||
cm.LoadCache(this->BinaryDir);
|
||||
} else {
|
||||
// do the cmake step, no timeout here since it is not a sub process
|
||||
if (this->RunCMake(&cm)) {
|
||||
if (!this->RunCMake(&cm)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
private:
|
||||
cmCTest* CTest;
|
||||
|
||||
int RunCMake(cmake* cm);
|
||||
bool RunCMake(cmake* cm);
|
||||
bool RunTest(std::vector<std::string> const& args, int* retVal,
|
||||
cmDuration timeout);
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "cmCTestUpdateHandler.h"
|
||||
#include "cmCTestUploadHandler.h"
|
||||
#include "cmCommandLineArgument.h"
|
||||
#include "cmDynamicLoader.h"
|
||||
#include "cmExecutionStatus.h"
|
||||
#include "cmGeneratedFileStream.h"
|
||||
#include "cmGlobalGenerator.h"
|
||||
@@ -3004,7 +3005,11 @@ int cmCTest::ExecuteTests()
|
||||
|
||||
int cmCTest::RunCMakeAndTest()
|
||||
{
|
||||
return this->Impl->BuildAndTest.Run();
|
||||
int retv = this->Impl->BuildAndTest.Run();
|
||||
#ifndef CMAKE_BOOTSTRAP
|
||||
cmDynamicLoader::FlushCache();
|
||||
#endif
|
||||
return retv;
|
||||
}
|
||||
|
||||
void cmCTest::SetNotesFiles(const std::string& notes)
|
||||
|
||||
Reference in New Issue
Block a user