ctest_configure: Add QUIET option
This commit is contained in:
parent
645ad117e1
commit
f999dc0bbf
|
@ -6,7 +6,7 @@ Configure the project build tree.
|
||||||
::
|
::
|
||||||
|
|
||||||
ctest_configure([BUILD build_dir] [SOURCE source_dir] [APPEND]
|
ctest_configure([BUILD build_dir] [SOURCE source_dir] [APPEND]
|
||||||
[OPTIONS options] [RETURN_VALUE res])
|
[OPTIONS options] [RETURN_VALUE res] [QUIET])
|
||||||
|
|
||||||
Configures the given build directory and stores results in
|
Configures the given build directory and stores results in
|
||||||
Configure.xml. If no BUILD is given, the CTEST_BINARY_DIRECTORY
|
Configure.xml. If no BUILD is given, the CTEST_BINARY_DIRECTORY
|
||||||
|
@ -19,3 +19,7 @@ build tool.
|
||||||
The APPEND option marks results for append to those previously
|
The APPEND option marks results for append to those previously
|
||||||
submitted to a dashboard server since the last ctest_start. Append
|
submitted to a dashboard server since the last ctest_start. Append
|
||||||
semantics are defined by the dashboard server in use.
|
semantics are defined by the dashboard server in use.
|
||||||
|
|
||||||
|
The QUIET option suppresses any CTest-specific non-error messages
|
||||||
|
that would have otherwise been printed to the console. Output from
|
||||||
|
the underlying configure command is not affected.
|
||||||
|
|
|
@ -45,7 +45,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||||
if ( ctestConfigureCommand && *ctestConfigureCommand )
|
if ( ctestConfigureCommand && *ctestConfigureCommand )
|
||||||
{
|
{
|
||||||
this->CTest->SetCTestConfiguration("ConfigureCommand",
|
this->CTest->SetCTestConfiguration("ConfigureCommand",
|
||||||
ctestConfigureCommand);
|
ctestConfigureCommand, this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -141,7 +141,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||||
cmakeConfigureCommand += "\"";
|
cmakeConfigureCommand += "\"";
|
||||||
|
|
||||||
this->CTest->SetCTestConfiguration("ConfigureCommand",
|
this->CTest->SetCTestConfiguration("ConfigureCommand",
|
||||||
cmakeConfigureCommand.c_str());
|
cmakeConfigureCommand.c_str(), this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -160,5 +160,6 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||||
"internal CTest error. Cannot instantiate configure handler");
|
"internal CTest error. Cannot instantiate configure handler");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
handler->SetQuiet(this->Quiet);
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,8 @@ void cmCTestConfigureHandler::Initialize()
|
||||||
//functions and commented...
|
//functions and commented...
|
||||||
int cmCTestConfigureHandler::ProcessHandler()
|
int cmCTestConfigureHandler::ProcessHandler()
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "Configure project" << std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
"Configure project" << std::endl, this->Quiet);
|
||||||
std::string cCommand
|
std::string cCommand
|
||||||
= this->CTest->GetCTestConfiguration("ConfigureCommand");
|
= this->CTest->GetCTestConfiguration("ConfigureCommand");
|
||||||
if (cCommand.empty())
|
if (cCommand.empty())
|
||||||
|
@ -75,8 +76,8 @@ int cmCTestConfigureHandler::ProcessHandler()
|
||||||
|
|
||||||
cmGeneratedFileStream ofs;
|
cmGeneratedFileStream ofs;
|
||||||
this->StartLogFile("Configure", ofs);
|
this->StartLogFile("Configure", ofs);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Configure with command: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< cCommand << std::endl);
|
"Configure with command: " << cCommand << std::endl, this->Quiet);
|
||||||
res = this->CTest->RunMakeCommand(cCommand.c_str(), output,
|
res = this->CTest->RunMakeCommand(cCommand.c_str(), output,
|
||||||
&retVal, buildDirectory.c_str(),
|
&retVal, buildDirectory.c_str(),
|
||||||
0, ofs);
|
0, ofs);
|
||||||
|
@ -101,7 +102,7 @@ int cmCTestConfigureHandler::ProcessHandler()
|
||||||
}
|
}
|
||||||
os << "<ConfigureCommand>" << cCommand << "</ConfigureCommand>"
|
os << "<ConfigureCommand>" << cCommand << "</ConfigureCommand>"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
cmCTestLog(this->CTest, DEBUG, "End" << std::endl);
|
cmCTestOptionalLog(this->CTest, DEBUG, "End" << std::endl, this->Quiet);
|
||||||
os << "<Log>" << cmXMLSafe(output) << "</Log>" << std::endl;
|
os << "<Log>" << cmXMLSafe(output) << "</Log>" << std::endl;
|
||||||
std::string end_time = this->CTest->CurrentTime();
|
std::string end_time = this->CTest->CurrentTime();
|
||||||
os << "\t<ConfigureStatus>" << retVal << "</ConfigureStatus>\n"
|
os << "\t<ConfigureStatus>" << retVal << "</ConfigureStatus>\n"
|
||||||
|
@ -119,8 +120,8 @@ int cmCTestConfigureHandler::ProcessHandler()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "Configure with command: " << cCommand
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
<< std::endl);
|
"Configure with command: " << cCommand << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
if (! res || retVal )
|
if (! res || retVal )
|
||||||
{
|
{
|
||||||
|
|
|
@ -129,6 +129,7 @@ add_RunCMake_test(build_command)
|
||||||
add_RunCMake_test(export)
|
add_RunCMake_test(export)
|
||||||
add_RunCMake_test(cmake_minimum_required)
|
add_RunCMake_test(cmake_minimum_required)
|
||||||
add_RunCMake_test(continue)
|
add_RunCMake_test(continue)
|
||||||
|
add_RunCMake_test(ctest_configure)
|
||||||
add_RunCMake_test(ctest_start)
|
add_RunCMake_test(ctest_start)
|
||||||
add_RunCMake_test(ctest_submit)
|
add_RunCMake_test(ctest_submit)
|
||||||
add_RunCMake_test(file)
|
add_RunCMake_test(file)
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
project(CTestConfigure@CASE_NAME@ NONE)
|
||||||
|
include(CTest)
|
||||||
|
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
|
|
@ -0,0 +1 @@
|
||||||
|
set(CTEST_PROJECT_NAME "CTestConfigure@CASE_NAME@")
|
|
@ -0,0 +1,9 @@
|
||||||
|
Run dashboard with model Experimental
|
||||||
|
Source directory: .*/Tests/RunCMake/ctest_configure/ConfigureQuiet
|
||||||
|
Build directory: .*/Tests/RunCMake/ctest_configure/ConfigureQuiet-build
|
||||||
|
Reading ctest configuration file: .*/Tests/RunCMake/ctest_configure/ConfigureQuiet/CTestConfig.cmake
|
||||||
|
Site: test-site
|
||||||
|
Build name: test-build-name
|
||||||
|
Use Experimental tag: [0-9-]+
|
||||||
|
Each . represents 1024 bytes of output
|
||||||
|
. Size of output: 0K
|
|
@ -0,0 +1,10 @@
|
||||||
|
include(RunCTest)
|
||||||
|
|
||||||
|
set(CASE_CTEST_CONFIGURE_ARGS "")
|
||||||
|
|
||||||
|
function(run_ctest_configure CASE_NAME)
|
||||||
|
set(CASE_CTEST_CONFIGURE_ARGS "${ARGN}")
|
||||||
|
run_ctest(${CASE_NAME})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
run_ctest_configure(ConfigureQuiet QUIET)
|
|
@ -0,0 +1,14 @@
|
||||||
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
|
set(CTEST_SITE "test-site")
|
||||||
|
set(CTEST_BUILD_NAME "test-build-name")
|
||||||
|
set(CTEST_SOURCE_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@")
|
||||||
|
set(CTEST_BINARY_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@-build")
|
||||||
|
set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@")
|
||||||
|
set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@")
|
||||||
|
set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@")
|
||||||
|
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
|
||||||
|
|
||||||
|
set(ctest_configure_args "@CASE_CTEST_CONFIGURE_ARGS@")
|
||||||
|
ctest_start(Experimental)
|
||||||
|
ctest_configure(${ctest_configure_args})
|
Loading…
Reference in New Issue