Merge topic 'ctest-output-options'
ff1ddd2a ctest_upload: Add QUIET option 0b87b2a3 ctest_memcheck: Add QUIET option fc58bdb9 ctest_coverage: Add QUIET option 876a680d ctest_test: Add QUIET option 49ba4545 ctest_build: Add QUIET option f999dc0b ctest_configure: Add QUIET option 645ad117 ctest_update: Add QUIET option 19d1a559 ctest_start: Add QUIET option 1643b905 ctest_submit: Add QUIET option 12db1139 CTest: Add cmCTestOptionalLog macro
This commit is contained in:
commit
206ce77781
@ -23,6 +23,11 @@ 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 output
|
||||||
|
that would have been printed to the console otherwise. The summary
|
||||||
|
of warnings / errors, as well as the output from the native build tool
|
||||||
|
is unaffected by this option.
|
||||||
|
|
||||||
If set, the contents of the variable CTEST_BUILD_FLAGS are passed as
|
If set, the contents of the variable CTEST_BUILD_FLAGS are passed as
|
||||||
additional arguments to the underlying build command. This can e.g. be
|
additional arguments to the underlying build command. This can e.g. be
|
||||||
used to trigger a parallel build using the -j option of make. See
|
used to trigger a parallel build using the -j option of make. See
|
||||||
|
@ -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.
|
||||||
|
@ -18,3 +18,8 @@ files labeled with at least one of the labels specified.
|
|||||||
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 output
|
||||||
|
that would have been printed to the console otherwise. The summary
|
||||||
|
indicating how many lines of code were covered is unaffected by this
|
||||||
|
option.
|
||||||
|
@ -26,3 +26,7 @@ the number of tests to be run in parallel.
|
|||||||
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 tests are not affected.
|
||||||
|
@ -5,7 +5,7 @@ Starts the testing for a given model
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
ctest_start(Model [TRACK <track>] [APPEND] [source [binary]])
|
ctest_start(Model [TRACK <track>] [APPEND] [source [binary]] [QUIET])
|
||||||
|
|
||||||
Starts the testing for a given model. The command should be called
|
Starts the testing for a given model. The command should be called
|
||||||
after the binary directory is initialized. If the 'source' and
|
after the binary directory is initialized. If the 'source' and
|
||||||
@ -14,7 +14,8 @@ after the binary directory is initialized. If the 'source' and
|
|||||||
If the track is
|
If the track is
|
||||||
specified, the submissions will go to the specified track. If APPEND
|
specified, the submissions will go to the specified track. If APPEND
|
||||||
is used, the existing TAG is used rather than creating a new one based
|
is used, the existing TAG is used rather than creating a new one based
|
||||||
on the current time stamp.
|
on the current time stamp. If QUIET is used, CTest will suppress any
|
||||||
|
non-error messages that it otherwise would have printed to the console.
|
||||||
|
|
||||||
If the :variable:`CTEST_CHECKOUT_COMMAND` variable
|
If the :variable:`CTEST_CHECKOUT_COMMAND` variable
|
||||||
(or the :variable:`CTEST_CVS_CHECKOUT` variable)
|
(or the :variable:`CTEST_CVS_CHECKOUT` variable)
|
||||||
|
@ -9,6 +9,7 @@ Submit results to a dashboard server.
|
|||||||
[RETRY_COUNT count]
|
[RETRY_COUNT count]
|
||||||
[RETRY_DELAY delay]
|
[RETRY_DELAY delay]
|
||||||
[RETURN_VALUE res]
|
[RETURN_VALUE res]
|
||||||
|
[QUIET]
|
||||||
)
|
)
|
||||||
|
|
||||||
By default all available parts are submitted if no PARTS or FILES are
|
By default all available parts are submitted if no PARTS or FILES are
|
||||||
@ -38,6 +39,9 @@ timed-out submission before attempting to re-submit.
|
|||||||
The RETRY_COUNT option specifies how many times to retry a timed-out
|
The RETRY_COUNT option specifies how many times to retry a timed-out
|
||||||
submission.
|
submission.
|
||||||
|
|
||||||
|
The QUIET option suppresses all non-error messages that would have
|
||||||
|
otherwise been printed by this call to ctest_submit().
|
||||||
|
|
||||||
Submit to CDash Upload API
|
Submit to CDash Upload API
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
@ -31,3 +31,9 @@ tests should all stop running.
|
|||||||
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 test command is not affected. Summary info detailing
|
||||||
|
the percentage of passing tests is also unaffected by the QUIET
|
||||||
|
option.
|
||||||
|
@ -5,9 +5,14 @@ Update the work tree from version control.
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
ctest_update([SOURCE source] [RETURN_VALUE res])
|
ctest_update([SOURCE source] [RETURN_VALUE res] [QUIET])
|
||||||
|
|
||||||
Updates the given source directory and stores results in Update.xml.
|
Updates the given source directory and stores results in Update.xml.
|
||||||
If no SOURCE is given, the CTEST_SOURCE_DIRECTORY variable is used.
|
If no SOURCE is given, the CTEST_SOURCE_DIRECTORY variable is used.
|
||||||
The RETURN_VALUE option specifies a variable in which to store the
|
The RETURN_VALUE option specifies a variable in which to store the
|
||||||
result, which is the number of files updated or -1 on error.
|
result, which is the number of files updated or -1 on error.
|
||||||
|
|
||||||
|
If QUIET is specified then CTest will suppress most non-error
|
||||||
|
messages that it would have otherwise printed to the console.
|
||||||
|
CTest will still report the new revision of the repository
|
||||||
|
and any conflicting files that were found.
|
||||||
|
@ -5,7 +5,10 @@ Upload files to a dashboard server.
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
ctest_upload(FILES ...)
|
ctest_upload(FILES ... [QUIET])
|
||||||
|
|
||||||
Pass a list of files to be sent along with the build results to the
|
Pass a list of files to be sent along with the build results to the
|
||||||
dashboard server.
|
dashboard server.
|
||||||
|
|
||||||
|
The QUIET option suppresses any CTest-specific non-error output
|
||||||
|
that would have been printed to the console otherwise.
|
||||||
|
@ -45,6 +45,10 @@
|
|||||||
# Specify options to be passed to gcov. The ``gcov`` command
|
# Specify options to be passed to gcov. The ``gcov`` command
|
||||||
# is run as ``gcov <options>... -o <gcov-dir> <file>.gcda``.
|
# is run as ``gcov <options>... -o <gcov-dir> <file>.gcda``.
|
||||||
# If not specified, the default option is just ``-b``.
|
# If not specified, the default option is just ``-b``.
|
||||||
|
#
|
||||||
|
# ``QUIET``
|
||||||
|
# Suppress non-error messages that otherwise would have been
|
||||||
|
# printed out by this function.
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2014-2015 Kitware, Inc.
|
# Copyright 2014-2015 Kitware, Inc.
|
||||||
@ -60,7 +64,7 @@
|
|||||||
# License text for the above reference.)
|
# License text for the above reference.)
|
||||||
include(CMakeParseArguments)
|
include(CMakeParseArguments)
|
||||||
function(ctest_coverage_collect_gcov)
|
function(ctest_coverage_collect_gcov)
|
||||||
set(options "")
|
set(options QUIET)
|
||||||
set(oneValueArgs TARBALL SOURCE BUILD GCOV_COMMAND)
|
set(oneValueArgs TARBALL SOURCE BUILD GCOV_COMMAND)
|
||||||
set(multiValueArgs GCOV_OPTIONS)
|
set(multiValueArgs GCOV_OPTIONS)
|
||||||
cmake_parse_arguments(GCOV "${options}" "${oneValueArgs}"
|
cmake_parse_arguments(GCOV "${options}" "${oneValueArgs}"
|
||||||
@ -106,8 +110,10 @@ function(ctest_coverage_collect_gcov)
|
|||||||
# return early if no coverage files were found
|
# return early if no coverage files were found
|
||||||
list(LENGTH gcda_files len)
|
list(LENGTH gcda_files len)
|
||||||
if(len EQUAL 0)
|
if(len EQUAL 0)
|
||||||
message("ctest_coverage_collect_gcov: No .gcda files found, "
|
if (NOT GCOV_QUIET)
|
||||||
"ignoring coverage request.")
|
message("ctest_coverage_collect_gcov: No .gcda files found, "
|
||||||
|
"ignoring coverage request.")
|
||||||
|
endif()
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
# setup the dir for the coverage files
|
# setup the dir for the coverage files
|
||||||
@ -130,7 +136,9 @@ function(ctest_coverage_collect_gcov)
|
|||||||
WORKING_DIRECTORY ${coverage_dir})
|
WORKING_DIRECTORY ${coverage_dir})
|
||||||
endforeach()
|
endforeach()
|
||||||
if(NOT "${res}" EQUAL 0)
|
if(NOT "${res}" EQUAL 0)
|
||||||
message(STATUS "Error running gcov: ${res} ${out}")
|
if (NOT GCOV_QUIET)
|
||||||
|
message(STATUS "Error running gcov: ${res} ${out}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
# create json file with project information
|
# create json file with project information
|
||||||
file(WRITE ${coverage_dir}/data.json
|
file(WRITE ${coverage_dir}/data.json
|
||||||
@ -151,8 +159,15 @@ function(ctest_coverage_collect_gcov)
|
|||||||
${coverage_dir}/data.json
|
${coverage_dir}/data.json
|
||||||
${label_files}
|
${label_files}
|
||||||
")
|
")
|
||||||
|
|
||||||
|
if (GCOV_QUIET)
|
||||||
|
set(tar_opts "cfj")
|
||||||
|
else()
|
||||||
|
set(tar_opts "cvfj")
|
||||||
|
endif()
|
||||||
|
|
||||||
execute_process(COMMAND
|
execute_process(COMMAND
|
||||||
${CMAKE_COMMAND} -E tar cvfj ${GCOV_TARBALL}
|
${CMAKE_COMMAND} -E tar ${tar_opts} ${GCOV_TARBALL}
|
||||||
"--mtime=1970-01-01 0:0:0 UTC"
|
"--mtime=1970-01-01 0:0:0 UTC"
|
||||||
--files-from=${coverage_dir}/coverage_file_list.txt
|
--files-from=${coverage_dir}/coverage_file_list.txt
|
||||||
WORKING_DIRECTORY ${binary_dir})
|
WORKING_DIRECTORY ${binary_dir})
|
||||||
|
@ -58,7 +58,8 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
|
|||||||
= this->Makefile->GetDefinition("CTEST_BUILD_COMMAND");
|
= this->Makefile->GetDefinition("CTEST_BUILD_COMMAND");
|
||||||
if ( ctestBuildCommand && *ctestBuildCommand )
|
if ( ctestBuildCommand && *ctestBuildCommand )
|
||||||
{
|
{
|
||||||
this->CTest->SetCTestConfiguration("MakeCommand", ctestBuildCommand);
|
this->CTest->SetCTestConfiguration("MakeCommand", ctestBuildCommand,
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -141,10 +142,10 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
|
|||||||
GenerateCMakeBuildCommand(cmakeBuildTarget ? cmakeBuildTarget : "",
|
GenerateCMakeBuildCommand(cmakeBuildTarget ? cmakeBuildTarget : "",
|
||||||
cmakeBuildConfiguration,
|
cmakeBuildConfiguration,
|
||||||
cmakeBuildAdditionalFlags ? cmakeBuildAdditionalFlags : "", true);
|
cmakeBuildAdditionalFlags ? cmakeBuildAdditionalFlags : "", true);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"SetMakeCommand:"
|
"SetMakeCommand:" << buildCommand << "\n", this->Quiet);
|
||||||
<< buildCommand << "\n");
|
this->CTest->SetCTestConfiguration("MakeCommand", buildCommand.c_str(),
|
||||||
this->CTest->SetCTestConfiguration("MakeCommand", buildCommand.c_str());
|
this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -168,9 +169,11 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
|
|||||||
if(const char* useLaunchers =
|
if(const char* useLaunchers =
|
||||||
this->Makefile->GetDefinition("CTEST_USE_LAUNCHERS"))
|
this->Makefile->GetDefinition("CTEST_USE_LAUNCHERS"))
|
||||||
{
|
{
|
||||||
this->CTest->SetCTestConfiguration("UseLaunchers", useLaunchers);
|
this->CTest->SetCTestConfiguration("UseLaunchers", useLaunchers,
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handler->SetQuiet(this->Quiet);
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,9 +286,9 @@ std::string cmCTestBuildHandler::GetMakeCommand()
|
|||||||
{
|
{
|
||||||
std::string makeCommand
|
std::string makeCommand
|
||||||
= this->CTest->GetCTestConfiguration("MakeCommand");
|
= this->CTest->GetCTestConfiguration("MakeCommand");
|
||||||
cmCTestLog(this->CTest,
|
cmCTestOptionalLog(this->CTest,
|
||||||
HANDLER_VERBOSE_OUTPUT, "MakeCommand:" << makeCommand <<
|
HANDLER_VERBOSE_OUTPUT, "MakeCommand:" << makeCommand << "\n",
|
||||||
"\n");
|
this->Quiet);
|
||||||
|
|
||||||
std::string configType = this->CTest->GetConfigType();
|
std::string configType = this->CTest->GetConfigType();
|
||||||
if (configType == "")
|
if (configType == "")
|
||||||
@ -312,7 +312,8 @@ std::string cmCTestBuildHandler::GetMakeCommand()
|
|||||||
//functions and commented...
|
//functions and commented...
|
||||||
int cmCTestBuildHandler::ProcessHandler()
|
int cmCTestBuildHandler::ProcessHandler()
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "Build project" << std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Build project" << std::endl,
|
||||||
|
this->Quiet);
|
||||||
|
|
||||||
// do we have time for this
|
// do we have time for this
|
||||||
if (this->CTest->GetRemainingTimeAllowed() < 120)
|
if (this->CTest->GetRemainingTimeAllowed() < 120)
|
||||||
@ -401,12 +402,12 @@ int cmCTestBuildHandler::ProcessHandler()
|
|||||||
|
|
||||||
#define cmCTestBuildHandlerPopulateRegexVector(strings, regexes) \
|
#define cmCTestBuildHandlerPopulateRegexVector(strings, regexes) \
|
||||||
regexes.clear(); \
|
regexes.clear(); \
|
||||||
cmCTestLog(this->CTest, DEBUG, this << "Add " #regexes \
|
cmCTestOptionalLog(this->CTest, DEBUG, this << "Add " #regexes \
|
||||||
<< std::endl); \
|
<< std::endl, this->Quiet); \
|
||||||
for ( it = strings.begin(); it != strings.end(); ++it ) \
|
for ( it = strings.begin(); it != strings.end(); ++it ) \
|
||||||
{ \
|
{ \
|
||||||
cmCTestLog(this->CTest, DEBUG, "Add " #strings ": " \
|
cmCTestOptionalLog(this->CTest, DEBUG, "Add " #strings ": " \
|
||||||
<< *it << std::endl); \
|
<< *it << std::endl, this->Quiet); \
|
||||||
regexes.push_back(it->c_str()); \
|
regexes.push_back(it->c_str()); \
|
||||||
}
|
}
|
||||||
cmCTestBuildHandlerPopulateRegexVector(
|
cmCTestBuildHandlerPopulateRegexVector(
|
||||||
@ -472,8 +473,8 @@ int cmCTestBuildHandler::ProcessHandler()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "Build with command: " << makeCommand
|
cmCTestOptionalLog(this->CTest, DEBUG, "Build with command: " <<
|
||||||
<< std::endl);
|
makeCommand << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remember end build time and calculate elapsed time
|
// Remember end build time and calculate elapsed time
|
||||||
@ -906,13 +907,16 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
|
|||||||
}
|
}
|
||||||
argv.push_back(0);
|
argv.push_back(0);
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command:");
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command:",
|
||||||
|
this->Quiet);
|
||||||
std::vector<const char*>::iterator ait;
|
std::vector<const char*>::iterator ait;
|
||||||
for ( ait = argv.begin(); ait != argv.end() && *ait; ++ ait )
|
for ( ait = argv.begin(); ait != argv.end() && *ait; ++ ait )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " \"" << *ait << "\"");
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " \"" << *ait <<
|
||||||
|
"\"", this->Quiet);
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl,
|
||||||
|
this->Quiet);
|
||||||
|
|
||||||
// Optionally use make rule launchers to record errors and warnings.
|
// Optionally use make rule launchers to record errors and warnings.
|
||||||
LaunchHelper launchHelper(this);
|
LaunchHelper launchHelper(this);
|
||||||
@ -932,12 +936,12 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
|
|||||||
|
|
||||||
char* data;
|
char* data;
|
||||||
int length;
|
int length;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
" Each symbol represents " << tick_len << " bytes of output."
|
" Each symbol represents " << tick_len << " bytes of output."
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< (this->UseCTestLaunch? "" :
|
<< (this->UseCTestLaunch? "" :
|
||||||
" '!' represents an error and '*' a warning.\n")
|
" '!' represents an error and '*' a warning.\n")
|
||||||
<< " " << std::flush);
|
<< " " << std::flush, this->Quiet);
|
||||||
|
|
||||||
// Initialize building structures
|
// Initialize building structures
|
||||||
this->BuildProcessingQueue.clear();
|
this->BuildProcessingQueue.clear();
|
||||||
@ -980,8 +984,9 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
|
|||||||
this->ProcessBuffer(0, 0, tick, tick_len, ofs, &this->BuildProcessingQueue);
|
this->ProcessBuffer(0, 0, tick, tick_len, ofs, &this->BuildProcessingQueue);
|
||||||
this->ProcessBuffer(0, 0, tick, tick_len, ofs,
|
this->ProcessBuffer(0, 0, tick, tick_len, ofs,
|
||||||
&this->BuildProcessingErrorQueue);
|
&this->BuildProcessingErrorQueue);
|
||||||
cmCTestLog(this->CTest, OUTPUT, " Size of output: "
|
cmCTestOptionalLog(this->CTest, OUTPUT, " Size of output: "
|
||||||
<< ((this->BuildOutputLogSize + 512) / 1024) << "K" << std::endl);
|
<< ((this->BuildOutputLogSize + 512) / 1024) << "K" << std::endl,
|
||||||
|
this->Quiet);
|
||||||
|
|
||||||
// Properly handle output of the build command
|
// Properly handle output of the build command
|
||||||
cmsysProcess_WaitForExit(cp, 0);
|
cmsysProcess_WaitForExit(cp, 0);
|
||||||
@ -992,8 +997,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
|
|||||||
if (retVal)
|
if (retVal)
|
||||||
{
|
{
|
||||||
*retVal = cmsysProcess_GetExitValue(cp);
|
*retVal = cmsysProcess_GetExitValue(cp);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Command exited with the value: " << *retVal << std::endl);
|
"Command exited with the value: " << *retVal << std::endl, this->Quiet);
|
||||||
// if a non zero return value
|
// if a non zero return value
|
||||||
if (*retVal)
|
if (*retVal)
|
||||||
{
|
{
|
||||||
@ -1017,13 +1022,14 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
|
|||||||
if (retVal)
|
if (retVal)
|
||||||
{
|
{
|
||||||
*retVal = cmsysProcess_GetExitException(cp);
|
*retVal = cmsysProcess_GetExitException(cp);
|
||||||
cmCTestLog(this->CTest, WARNING, "There was an exception: " << *retVal
|
cmCTestOptionalLog(this->CTest, WARNING, "There was an exception: " <<
|
||||||
<< std::endl);
|
*retVal << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(result == cmsysProcess_State_Expired)
|
else if(result == cmsysProcess_State_Expired)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, WARNING, "There was a timeout" << std::endl);
|
cmCTestOptionalLog(this->CTest, WARNING, "There was a timeout" <<
|
||||||
|
std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
else if(result == cmsysProcess_State_Error)
|
else if(result == cmsysProcess_State_Error)
|
||||||
{
|
{
|
||||||
@ -1185,13 +1191,14 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, int length,
|
|||||||
while ( this->BuildOutputLogSize > (tick * tick_len) )
|
while ( this->BuildOutputLogSize > (tick * tick_len) )
|
||||||
{
|
{
|
||||||
tick ++;
|
tick ++;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, this->LastTickChar);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, this->LastTickChar,
|
||||||
|
this->Quiet);
|
||||||
tickDisplayed = true;
|
tickDisplayed = true;
|
||||||
if ( tick % tick_line_len == 0 && tick > 0 )
|
if ( tick % tick_line_len == 0 && tick > 0 )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Size: "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Size: "
|
||||||
<< ((this->BuildOutputLogSize + 512) / 1024) << "K" << std::endl
|
<< ((this->BuildOutputLogSize + 512) / 1024) << "K" << std::endl
|
||||||
<< " ");
|
<< " ", this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( tickDisplayed )
|
if ( tickDisplayed )
|
||||||
@ -1216,7 +1223,8 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
|
|||||||
return b_REGULAR_LINE;
|
return b_REGULAR_LINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, DEBUG, "Line: [" << data << "]" << std::endl);
|
cmCTestOptionalLog(this->CTest, DEBUG, "Line: [" << data << "]" <<
|
||||||
|
std::endl, this->Quiet);
|
||||||
|
|
||||||
std::vector<cmsys::RegularExpression>::iterator it;
|
std::vector<cmsys::RegularExpression>::iterator it;
|
||||||
|
|
||||||
@ -1236,9 +1244,9 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
|
|||||||
if ( it->find(data) )
|
if ( it->find(data) )
|
||||||
{
|
{
|
||||||
errorLine = 1;
|
errorLine = 1;
|
||||||
cmCTestLog(this->CTest, DEBUG, " Error Line: " << data
|
cmCTestOptionalLog(this->CTest, DEBUG, " Error Line: " << data
|
||||||
<< " (matches: " << this->CustomErrorMatches[wrxCnt] << ")"
|
<< " (matches: " << this->CustomErrorMatches[wrxCnt] << ")"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wrxCnt ++;
|
wrxCnt ++;
|
||||||
@ -1252,9 +1260,9 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
|
|||||||
if ( it->find(data) )
|
if ( it->find(data) )
|
||||||
{
|
{
|
||||||
errorLine = 0;
|
errorLine = 0;
|
||||||
cmCTestLog(this->CTest, DEBUG, " Not an error Line: " << data
|
cmCTestOptionalLog(this->CTest, DEBUG, " Not an error Line: " << data
|
||||||
<< " (matches: " << this->CustomErrorExceptions[wrxCnt] << ")"
|
<< " (matches: " << this->CustomErrorExceptions[wrxCnt] << ")"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wrxCnt ++;
|
wrxCnt ++;
|
||||||
@ -1271,10 +1279,10 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
|
|||||||
if ( it->find(data) )
|
if ( it->find(data) )
|
||||||
{
|
{
|
||||||
warningLine = 1;
|
warningLine = 1;
|
||||||
cmCTestLog(this->CTest, DEBUG,
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
" Warning Line: " << data
|
" Warning Line: " << data
|
||||||
<< " (matches: " << this->CustomWarningMatches[wrxCnt] << ")"
|
<< " (matches: " << this->CustomWarningMatches[wrxCnt] << ")"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wrxCnt ++;
|
wrxCnt ++;
|
||||||
@ -1289,9 +1297,9 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
|
|||||||
if ( it->find(data) )
|
if ( it->find(data) )
|
||||||
{
|
{
|
||||||
warningLine = 0;
|
warningLine = 0;
|
||||||
cmCTestLog(this->CTest, DEBUG, " Not a warning Line: " << data
|
cmCTestOptionalLog(this->CTest, DEBUG, " Not a warning Line: " << data
|
||||||
<< " (matches: " << this->CustomWarningExceptions[wrxCnt] << ")"
|
<< " (matches: " << this->CustomWarningExceptions[wrxCnt] << ")"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wrxCnt ++;
|
wrxCnt ++;
|
||||||
|
@ -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 )
|
||||||
{
|
{
|
||||||
|
@ -24,9 +24,9 @@ cmCTestCoverageCommand::cmCTestCoverageCommand()
|
|||||||
cmCTestGenericHandler* cmCTestCoverageCommand::InitializeHandler()
|
cmCTestGenericHandler* cmCTestCoverageCommand::InitializeHandler()
|
||||||
{
|
{
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"CoverageCommand", "CTEST_COVERAGE_COMMAND");
|
"CoverageCommand", "CTEST_COVERAGE_COMMAND", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"CoverageExtraFlags", "CTEST_COVERAGE_EXTRA_FLAGS");
|
"CoverageExtraFlags", "CTEST_COVERAGE_EXTRA_FLAGS", this->Quiet);
|
||||||
cmCTestCoverageHandler* handler = static_cast<cmCTestCoverageHandler*>(
|
cmCTestCoverageHandler* handler = static_cast<cmCTestCoverageHandler*>(
|
||||||
this->CTest->GetInitializedHandler("coverage"));
|
this->CTest->GetInitializedHandler("coverage"));
|
||||||
if ( !handler )
|
if ( !handler )
|
||||||
@ -41,6 +41,7 @@ cmCTestGenericHandler* cmCTestCoverageCommand::InitializeHandler()
|
|||||||
handler->SetLabelFilter(this->Labels);
|
handler->SetLabelFilter(this->Labels);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handler->SetQuiet(this->Quiet);
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,8 +176,8 @@ bool cmCTestCoverageHandler::StartCoverageLogFile(
|
|||||||
{
|
{
|
||||||
char covLogFilename[1024];
|
char covLogFilename[1024];
|
||||||
sprintf(covLogFilename, "CoverageLog-%d", logFileCount);
|
sprintf(covLogFilename, "CoverageLog-%d", logFileCount);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Open file: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Open file: "
|
||||||
<< covLogFilename << std::endl);
|
<< covLogFilename << std::endl, this->Quiet);
|
||||||
if(!this->StartResultingXML(cmCTest::PartCoverage,
|
if(!this->StartResultingXML(cmCTest::PartCoverage,
|
||||||
covLogFilename, covLogFile))
|
covLogFilename, covLogFile))
|
||||||
{
|
{
|
||||||
@ -209,8 +209,8 @@ void cmCTestCoverageHandler::EndCoverageLogFile(cmGeneratedFileStream& ostr,
|
|||||||
this->CTest->EndXML(ostr);
|
this->CTest->EndXML(ostr);
|
||||||
char covLogFilename[1024];
|
char covLogFilename[1024];
|
||||||
sprintf(covLogFilename, "CoverageLog-%d.xml", logFileCount);
|
sprintf(covLogFilename, "CoverageLog-%d.xml", logFileCount);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Close file: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Close file: "
|
||||||
<< covLogFilename << std::endl);
|
<< covLogFilename << std::endl, this->Quiet);
|
||||||
ostr.Close();
|
ostr.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,8 +230,8 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
|
|||||||
{
|
{
|
||||||
if ( sit->find(file) )
|
if ( sit->find(file) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " File " << file
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " File " << file
|
||||||
<< " is excluded in CTestCustom.ctest" << std::endl;);
|
<< " is excluded in CTestCustom.ctest" << std::endl;, this->Quiet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -272,8 +272,8 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
|
|||||||
fFile.c_str(), checkDir.c_str());
|
fFile.c_str(), checkDir.c_str());
|
||||||
if (!ndc.empty())
|
if (!ndc.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc
|
||||||
<< " so skip coverage of " << file << std::endl);
|
<< " so skip coverage of " << file << std::endl, this->Quiet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,8 +311,8 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
|
|||||||
fFile.c_str(), checkDir.c_str());
|
fFile.c_str(), checkDir.c_str());
|
||||||
if (!ndc.empty())
|
if (!ndc.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc
|
||||||
<< " so skip coverage of: " << file << std::endl);
|
<< " so skip coverage of: " << file << std::endl, this->Quiet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Ok, nothing in source tree, nothing in binary tree
|
// Ok, nothing in source tree, nothing in binary tree
|
||||||
@ -356,13 +356,15 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
cmSystemTools::ConvertToUnixSlashes(sourceDir);
|
cmSystemTools::ConvertToUnixSlashes(sourceDir);
|
||||||
cmSystemTools::ConvertToUnixSlashes(binaryDir);
|
cmSystemTools::ConvertToUnixSlashes(binaryDir);
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "Performing coverage" << std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
"Performing coverage" << std::endl, this->Quiet);
|
||||||
|
|
||||||
cmCTestCoverageHandlerContainer cont;
|
cmCTestCoverageHandlerContainer cont;
|
||||||
cont.Error = error;
|
cont.Error = error;
|
||||||
cont.SourceDir = sourceDir;
|
cont.SourceDir = sourceDir;
|
||||||
cont.BinaryDir = binaryDir;
|
cont.BinaryDir = binaryDir;
|
||||||
cont.OFS = &ofs;
|
cont.OFS = &ofs;
|
||||||
|
cont.Quiet = this->Quiet;
|
||||||
|
|
||||||
// setup the regex exclude stuff
|
// setup the regex exclude stuff
|
||||||
this->CustomCoverageExcludeRegex.clear();
|
this->CustomCoverageExcludeRegex.clear();
|
||||||
@ -442,9 +444,9 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
|
|
||||||
if ( file_count == 0 )
|
if ( file_count == 0 )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, WARNING,
|
cmCTestOptionalLog(this->CTest, WARNING,
|
||||||
" Cannot find any coverage files. Ignoring Coverage request."
|
" Cannot find any coverage files. Ignoring Coverage request."
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
cmGeneratedFileStream covSumFile;
|
cmGeneratedFileStream covSumFile;
|
||||||
@ -476,10 +478,11 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
long total_untested = 0;
|
long total_untested = 0;
|
||||||
//std::string fullSourceDir = sourceDir + "/";
|
//std::string fullSourceDir = sourceDir + "/";
|
||||||
//std::string fullBinaryDir = binaryDir + "/";
|
//std::string fullBinaryDir = binaryDir + "/";
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl, this->Quiet);
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
" Accumulating results (each . represents one file):" << std::endl);
|
" Accumulating results (each . represents one file):" << std::endl,
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
this->Quiet);
|
||||||
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
|
||||||
|
|
||||||
std::vector<std::string> errorsWhileAccumulating;
|
std::vector<std::string> errorsWhileAccumulating;
|
||||||
|
|
||||||
@ -488,14 +491,16 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
fileIterator != cont.TotalCoverage.end();
|
fileIterator != cont.TotalCoverage.end();
|
||||||
++fileIterator )
|
++fileIterator )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "." << std::flush);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "." << std::flush,
|
||||||
|
this->Quiet);
|
||||||
file_count ++;
|
file_count ++;
|
||||||
if ( file_count % 50 == 0 )
|
if ( file_count % 50 == 0 )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " processed: " << file_count
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " processed: "
|
||||||
|
<< file_count
|
||||||
<< " out of "
|
<< " out of "
|
||||||
<< cont.TotalCoverage.size() << std::endl);
|
<< cont.TotalCoverage.size() << std::endl, this->Quiet);
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string fullFileName = fileIterator->first;
|
const std::string fullFileName = fileIterator->first;
|
||||||
@ -504,15 +509,15 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
sourceDir.c_str(), binaryDir.c_str());
|
sourceDir.c_str(), binaryDir.c_str());
|
||||||
if ( !shouldIDoCoverage )
|
if ( !shouldIDoCoverage )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
".NoDartCoverage found, so skip coverage check for: "
|
".NoDartCoverage found, so skip coverage check for: "
|
||||||
<< fullFileName
|
<< fullFileName
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Process file: " << fullFileName << std::endl);
|
"Process file: " << fullFileName << std::endl, this->Quiet);
|
||||||
|
|
||||||
if ( !cmSystemTools::FileExists(fullFileName.c_str()) )
|
if ( !cmSystemTools::FileExists(fullFileName.c_str()) )
|
||||||
{
|
{
|
||||||
@ -556,8 +561,9 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
|
|
||||||
cmCTestCoverageHandlerContainer::SingleFileCoverageVector::size_type cc;
|
cmCTestCoverageHandlerContainer::SingleFileCoverageVector::size_type cc;
|
||||||
std::string line;
|
std::string line;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Actually performing coverage for: " << fullFileName << std::endl);
|
"Actually performing coverage for: " << fullFileName << std::endl,
|
||||||
|
this->Quiet);
|
||||||
for ( cc= 0; cc < fcov.size(); cc ++ )
|
for ( cc= 0; cc < fcov.size(); cc ++ )
|
||||||
{
|
{
|
||||||
if ( !cmSystemTools::GetLineFromStream(ifs, line) &&
|
if ( !cmSystemTools::GetLineFromStream(ifs, line) &&
|
||||||
@ -641,8 +647,8 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
}
|
}
|
||||||
int untested = 0;
|
int untested = 0;
|
||||||
std::string line;
|
std::string line;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Actually performing coverage for: " << *i << std::endl);
|
"Actually performing coverage for: " << *i << std::endl, this->Quiet);
|
||||||
while (cmSystemTools::GetLineFromStream(ifs, line))
|
while (cmSystemTools::GetLineFromStream(ifs, line))
|
||||||
{
|
{
|
||||||
covLogFile << "\t\t<Line Number=\"" << untested << "\" Count=\"0\">"
|
covLogFile << "\t\t<Line Number=\"" << untested << "\" Count=\"0\">"
|
||||||
@ -736,8 +742,8 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void cmCTestCoverageHandler::PopulateCustomVectors(cmMakefile *mf)
|
void cmCTestCoverageHandler::PopulateCustomVectors(cmMakefile *mf)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Add coverage exclude regular expressions." << std::endl);
|
" Add coverage exclude regular expressions." << std::endl, this->Quiet);
|
||||||
this->CTest->PopulateCustomVector(mf, "CTEST_CUSTOM_COVERAGE_EXCLUDE",
|
this->CTest->PopulateCustomVector(mf, "CTEST_CUSTOM_COVERAGE_EXCLUDE",
|
||||||
this->CustomCoverageExclude);
|
this->CustomCoverageExclude);
|
||||||
this->CTest->PopulateCustomVector(mf, "CTEST_EXTRA_COVERAGE_GLOB",
|
this->CTest->PopulateCustomVector(mf, "CTEST_EXTRA_COVERAGE_GLOB",
|
||||||
@ -747,14 +753,14 @@ void cmCTestCoverageHandler::PopulateCustomVectors(cmMakefile *mf)
|
|||||||
it != this->CustomCoverageExclude.end();
|
it != this->CustomCoverageExclude.end();
|
||||||
++ it )
|
++ it )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Add coverage exclude: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< *it << std::endl);
|
" Add coverage exclude: " << *it << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
for ( it = this->ExtraCoverageGlobs.begin();
|
for ( it = this->ExtraCoverageGlobs.begin();
|
||||||
it != this->ExtraCoverageGlobs.end(); ++it)
|
it != this->ExtraCoverageGlobs.end(); ++it)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Add coverage glob: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< *it << std::endl);
|
" Add coverage glob: " << *it << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -812,16 +818,16 @@ int cmCTestCoverageHandler::HandleCoberturaCoverage(
|
|||||||
|
|
||||||
if(cmSystemTools::FileExists(coverageXMLFile.c_str()))
|
if(cmSystemTools::FileExists(coverageXMLFile.c_str()))
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Parsing Cobertura XML file: " << coverageXMLFile
|
"Parsing Cobertura XML file: " << coverageXMLFile
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
cov.ReadCoverageXML(coverageXMLFile.c_str());
|
cov.ReadCoverageXML(coverageXMLFile.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Cannot find Cobertura XML file: " << coverageXMLFile
|
"Cannot find Cobertura XML file: " << coverageXMLFile
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
return static_cast<int>(cont->TotalCoverage.size());
|
return static_cast<int>(cont->TotalCoverage.size());
|
||||||
}
|
}
|
||||||
@ -836,33 +842,33 @@ int cmCTestCoverageHandler::HandleMumpsCoverage(
|
|||||||
"/gtm_coverage.mcov";
|
"/gtm_coverage.mcov";
|
||||||
if(cmSystemTools::FileExists(coverageFile.c_str()))
|
if(cmSystemTools::FileExists(coverageFile.c_str()))
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Parsing Cache Coverage: " << coverageFile
|
"Parsing Cache Coverage: " << coverageFile
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
cov.ReadCoverageFile(coverageFile.c_str());
|
cov.ReadCoverageFile(coverageFile.c_str());
|
||||||
return static_cast<int>(cont->TotalCoverage.size());
|
return static_cast<int>(cont->TotalCoverage.size());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Cannot find foobar GTM coverage file: " << coverageFile
|
" Cannot find GTM coverage file: " << coverageFile
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
cmParseCacheCoverage ccov(*cont, this->CTest);
|
cmParseCacheCoverage ccov(*cont, this->CTest);
|
||||||
coverageFile = this->CTest->GetBinaryDir() +
|
coverageFile = this->CTest->GetBinaryDir() +
|
||||||
"/cache_coverage.cmcov";
|
"/cache_coverage.cmcov";
|
||||||
if(cmSystemTools::FileExists(coverageFile.c_str()))
|
if(cmSystemTools::FileExists(coverageFile.c_str()))
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Parsing Cache Coverage: " << coverageFile
|
"Parsing Cache Coverage: " << coverageFile
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
ccov.ReadCoverageFile(coverageFile.c_str());
|
ccov.ReadCoverageFile(coverageFile.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Cannot find Cache coverage file: " << coverageFile
|
" Cannot find Cache coverage file: " << coverageFile
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
return static_cast<int>(cont->TotalCoverage.size());
|
return static_cast<int>(cont->TotalCoverage.size());
|
||||||
}
|
}
|
||||||
@ -912,15 +918,15 @@ int cmCTestCoverageHandler::HandleJacocoCoverage(
|
|||||||
files=g.GetFiles();
|
files=g.GetFiles();
|
||||||
if (!files.empty())
|
if (!files.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Found Jacoco Files, Performing Coverage" << std::endl);
|
"Found Jacoco Files, Performing Coverage" << std::endl, this->Quiet);
|
||||||
cov.LoadCoverageData(files);
|
cov.LoadCoverageData(files);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Cannot find Jacoco coverage files: " << coverageFile
|
" Cannot find Jacoco coverage files: " << coverageFile
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
return static_cast<int>(cont->TotalCoverage.size());
|
return static_cast<int>(cont->TotalCoverage.size());
|
||||||
}
|
}
|
||||||
@ -945,15 +951,16 @@ int cmCTestCoverageHandler::HandleDelphiCoverage(
|
|||||||
files=g.GetFiles();
|
files=g.GetFiles();
|
||||||
if (!files.empty())
|
if (!files.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Found Delphi HTML Files, Performing Coverage" << std::endl);
|
"Found Delphi HTML Files, Performing Coverage" << std::endl,
|
||||||
|
this->Quiet);
|
||||||
cov.LoadCoverageData(files);
|
cov.LoadCoverageData(files);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Cannot find Delphi coverage files: " << coverageFile
|
" Cannot find Delphi coverage files: " << coverageFile
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
return static_cast<int>(cont->TotalCoverage.size());
|
return static_cast<int>(cont->TotalCoverage.size());
|
||||||
}
|
}
|
||||||
@ -975,15 +982,16 @@ int cmCTestCoverageHandler::HandleBlanketJSCoverage(
|
|||||||
files=g.GetFiles();
|
files=g.GetFiles();
|
||||||
if (!files.empty())
|
if (!files.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Found BlanketJS output JSON, Performing Coverage" << std::endl);
|
"Found BlanketJS output JSON, Performing Coverage" << std::endl,
|
||||||
|
this->Quiet);
|
||||||
cov.LoadCoverageData(files);
|
cov.LoadCoverageData(files);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Cannot find BlanketJS coverage files: " << coverageFile
|
" Cannot find BlanketJS coverage files: " << coverageFile
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
return static_cast<int>(cont->TotalCoverage.size());
|
return static_cast<int>(cont->TotalCoverage.size());
|
||||||
}
|
}
|
||||||
@ -1039,9 +1047,9 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
|
|
||||||
if (files.empty())
|
if (files.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Cannot find any GCov coverage files."
|
" Cannot find any GCov coverage files."
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
// No coverage files is a valid thing, so the exit code is 0
|
// No coverage files is a valid thing, so the exit code is 0
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1057,9 +1065,10 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
std::set<std::string> missingFiles;
|
std::set<std::string> missingFiles;
|
||||||
|
|
||||||
std::string actualSourceFile = "";
|
std::string actualSourceFile = "";
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
" Processing coverage (each . represents one file):" << std::endl);
|
" Processing coverage (each . represents one file):" << std::endl,
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
this->Quiet);
|
||||||
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
|
||||||
int file_count = 0;
|
int file_count = 0;
|
||||||
|
|
||||||
// make sure output from gcov is in English!
|
// make sure output from gcov is in English!
|
||||||
@ -1072,7 +1081,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
//
|
//
|
||||||
for ( it = files.begin(); it != files.end(); ++ it )
|
for ( it = files.begin(); it != files.end(); ++ it )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "." << std::flush);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "." << std::flush,
|
||||||
|
this->Quiet);
|
||||||
|
|
||||||
// Call gcov to get coverage data for this *.gcda file:
|
// Call gcov to get coverage data for this *.gcda file:
|
||||||
//
|
//
|
||||||
@ -1082,8 +1092,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
"-o \"" + fileDir + "\" " +
|
"-o \"" + fileDir + "\" " +
|
||||||
"\"" + *it + "\"";
|
"\"" + *it + "\"";
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command.c_str()
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command.c_str()
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
|
|
||||||
std::string output = "";
|
std::string output = "";
|
||||||
std::string errors = "";
|
std::string errors = "";
|
||||||
@ -1111,12 +1121,12 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Command produced error: " << cont->Error << std::endl);
|
"Command produced error: " << cont->Error << std::endl);
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"--------------------------------------------------------------"
|
"--------------------------------------------------------------"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< output << std::endl
|
<< output << std::endl
|
||||||
<< "--------------------------------------------------------------"
|
<< "--------------------------------------------------------------"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
|
|
||||||
std::vector<std::string> lines;
|
std::vector<std::string> lines;
|
||||||
std::vector<std::string>::iterator line;
|
std::vector<std::string>::iterator line;
|
||||||
@ -1128,8 +1138,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
std::string sourceFile;
|
std::string sourceFile;
|
||||||
std::string gcovFile;
|
std::string gcovFile;
|
||||||
|
|
||||||
cmCTestLog(this->CTest, DEBUG, "Line: [" << *line << "]"
|
cmCTestOptionalLog(this->CTest, DEBUG, "Line: [" << *line << "]"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
|
|
||||||
if (line->empty())
|
if (line->empty())
|
||||||
{
|
{
|
||||||
@ -1229,8 +1239,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, WARNING, "Warning: " << st2re4.match(1)
|
cmCTestOptionalLog(this->CTest, WARNING, "Warning: " << st2re4.match(1)
|
||||||
<< " had unexpected EOF" << std::endl);
|
<< " had unexpected EOF" << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
else if ( st2re5.find(line->c_str() ) )
|
else if ( st2re5.find(line->c_str() ) )
|
||||||
{
|
{
|
||||||
@ -1246,8 +1256,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, WARNING, "Warning: Cannot open file: "
|
cmCTestOptionalLog(this->CTest, WARNING, "Warning: Cannot open file: "
|
||||||
<< st2re5.match(1) << std::endl);
|
<< st2re5.match(1) << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
else if ( st2re6.find(line->c_str() ) )
|
else if ( st2re6.find(line->c_str() ) )
|
||||||
{
|
{
|
||||||
@ -1263,8 +1273,9 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, WARNING, "Warning: File: " << st2re6.match(1)
|
cmCTestOptionalLog(this->CTest, WARNING, "Warning: File: "
|
||||||
<< " is newer than " << st2re6.match(2) << std::endl);
|
<< st2re6.match(1)
|
||||||
|
<< " is newer than " << st2re6.match(2) << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1291,8 +1302,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
cmCTestCoverageHandlerContainer::SingleFileCoverageVector& vec
|
cmCTestCoverageHandlerContainer::SingleFileCoverageVector& vec
|
||||||
= cont->TotalCoverage[actualSourceFile];
|
= cont->TotalCoverage[actualSourceFile];
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " in gcovFile: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< gcovFile << std::endl);
|
" in gcovFile: " << gcovFile << std::endl, this->Quiet);
|
||||||
|
|
||||||
cmsys::ifstream ifile(gcovFile.c_str());
|
cmsys::ifstream ifile(gcovFile.c_str());
|
||||||
if ( ! ifile )
|
if ( ! ifile )
|
||||||
@ -1366,8 +1377,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
//
|
//
|
||||||
if ( IsFileInDir(sourceFile, cont->SourceDir) )
|
if ( IsFileInDir(sourceFile, cont->SourceDir) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced s: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< sourceFile << std::endl);
|
" produced s: " << sourceFile << std::endl, this->Quiet);
|
||||||
*cont->OFS << " produced in source dir: " << sourceFile
|
*cont->OFS << " produced in source dir: " << sourceFile
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
actualSourceFile
|
actualSourceFile
|
||||||
@ -1375,8 +1386,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
}
|
}
|
||||||
else if ( IsFileInDir(sourceFile, cont->BinaryDir) )
|
else if ( IsFileInDir(sourceFile, cont->BinaryDir) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced b: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< sourceFile << std::endl);
|
" produced b: " << sourceFile << std::endl, this->Quiet);
|
||||||
*cont->OFS << " produced in binary dir: " << sourceFile
|
*cont->OFS << " produced in binary dir: " << sourceFile
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
actualSourceFile
|
actualSourceFile
|
||||||
@ -1387,19 +1398,19 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
{
|
{
|
||||||
if ( missingFiles.find(sourceFile) == missingFiles.end() )
|
if ( missingFiles.find(sourceFile) == missingFiles.end() )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Something went wrong" << std::endl);
|
"Something went wrong" << std::endl, this->Quiet);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Cannot find file: ["
|
"Cannot find file: ["
|
||||||
<< sourceFile << "]" << std::endl);
|
<< sourceFile << "]" << std::endl, this->Quiet);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" in source dir: ["
|
" in source dir: ["
|
||||||
<< cont->SourceDir << "]"
|
<< cont->SourceDir << "]"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" or binary dir: ["
|
" or binary dir: ["
|
||||||
<< cont->BinaryDir.size() << "]"
|
<< cont->BinaryDir.size() << "]"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
*cont->OFS << " Something went wrong. Cannot find file: "
|
*cont->OFS << " Something went wrong. Cannot find file: "
|
||||||
<< sourceFile
|
<< sourceFile
|
||||||
<< " in source dir: " << cont->SourceDir
|
<< " in source dir: " << cont->SourceDir
|
||||||
@ -1415,9 +1426,10 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
|
|
||||||
if ( file_count % 50 == 0 )
|
if ( file_count % 50 == 0 )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " processed: " << file_count
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " processed: "
|
||||||
<< " out of " << files.size() << std::endl);
|
<< file_count
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
<< " out of " << files.size() << std::endl, this->Quiet);
|
||||||
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1435,22 +1447,22 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
|||||||
= this->CTest->GetCTestConfiguration("CoverageExtraFlags");
|
= this->CTest->GetCTestConfiguration("CoverageExtraFlags");
|
||||||
if ( lcovCommand != "codecov" )
|
if ( lcovCommand != "codecov" )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Not a valid Intel Coverage command."
|
" Not a valid Intel Coverage command."
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// There is only percentage completed output from LCOV
|
// There is only percentage completed output from LCOV
|
||||||
std::string st2lcovOutputRex3 = "[0-9]+%";
|
std::string st2lcovOutputRex3 = "[0-9]+%";
|
||||||
cmsys::RegularExpression st2re3(st2lcovOutputRex3.c_str());
|
cmsys::RegularExpression st2re3(st2lcovOutputRex3.c_str());
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" This is coverage command: " << lcovCommand
|
" This is coverage command: " << lcovCommand
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" These are coverage command flags: " << lcovExtraFlags
|
" These are coverage command flags: " << lcovExtraFlags
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
|
|
||||||
std::vector<std::string> files;
|
std::vector<std::string> files;
|
||||||
this->FindLCovFiles(files);
|
this->FindLCovFiles(files);
|
||||||
@ -1458,9 +1470,9 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
|||||||
|
|
||||||
if (files.empty())
|
if (files.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Cannot find any LCov coverage files."
|
" Cannot find any LCov coverage files."
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
// No coverage files is a valid thing, so the exit code is 0
|
// No coverage files is a valid thing, so the exit code is 0
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1471,9 +1483,10 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
|||||||
std::set<std::string> missingFiles;
|
std::set<std::string> missingFiles;
|
||||||
|
|
||||||
std::string actualSourceFile = "";
|
std::string actualSourceFile = "";
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
" Processing coverage (each . represents one file):" << std::endl);
|
" Processing coverage (each . represents one file):" << std::endl,
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
this->Quiet);
|
||||||
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
|
||||||
int file_count = 0;
|
int file_count = 0;
|
||||||
|
|
||||||
// make sure output from lcov is in English!
|
// make sure output from lcov is in English!
|
||||||
@ -1484,16 +1497,17 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
|||||||
// directory. It collects all *.dyn files to generate .dpi file.
|
// directory. It collects all *.dyn files to generate .dpi file.
|
||||||
for ( it = files.begin(); it != files.end(); ++ it )
|
for ( it = files.begin(); it != files.end(); ++ it )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "." << std::flush);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "." << std::flush,
|
||||||
|
this->Quiet);
|
||||||
std::string fileDir = cmSystemTools::GetFilenamePath(*it);
|
std::string fileDir = cmSystemTools::GetFilenamePath(*it);
|
||||||
cmSystemTools::ChangeDirectory(fileDir);
|
cmSystemTools::ChangeDirectory(fileDir);
|
||||||
std::string command = "\"" + lcovCommand + "\" " +
|
std::string command = "\"" + lcovCommand + "\" " +
|
||||||
lcovExtraFlags + " ";
|
lcovExtraFlags + " ";
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Current coverage dir: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< fileDir << std::endl);
|
"Current coverage dir: " << fileDir << std::endl, this->Quiet);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command.c_str()
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command.c_str()
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
|
|
||||||
std::string output = "";
|
std::string output = "";
|
||||||
std::string errors = "";
|
std::string errors = "";
|
||||||
@ -1521,12 +1535,12 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
|||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Command produced error: " << cont->Error << std::endl);
|
"Command produced error: " << cont->Error << std::endl);
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"--------------------------------------------------------------"
|
"--------------------------------------------------------------"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< output << std::endl
|
<< output << std::endl
|
||||||
<< "--------------------------------------------------------------"
|
<< "--------------------------------------------------------------"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
|
|
||||||
std::vector<std::string> lines;
|
std::vector<std::string> lines;
|
||||||
std::vector<std::string>::iterator line;
|
std::vector<std::string>::iterator line;
|
||||||
@ -1554,8 +1568,8 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
|||||||
std::string daGlob;
|
std::string daGlob;
|
||||||
daGlob = dir;
|
daGlob = dir;
|
||||||
daGlob += "/*.LCOV";
|
daGlob += "/*.LCOV";
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" looking for LCOV files in: " << daGlob << std::endl);
|
" looking for LCOV files in: " << daGlob << std::endl, this->Quiet);
|
||||||
gl.FindFiles(daGlob);
|
gl.FindFiles(daGlob);
|
||||||
// Keep a list of all LCOV files
|
// Keep a list of all LCOV files
|
||||||
lcovFiles.insert(lcovFiles.end(), gl.GetFiles().begin(),
|
lcovFiles.insert(lcovFiles.end(), gl.GetFiles().begin(),
|
||||||
@ -1590,13 +1604,13 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
|||||||
for(std::vector<std::string>::iterator t = lcovFiles.begin();
|
for(std::vector<std::string>::iterator t = lcovFiles.begin();
|
||||||
t != lcovFiles.end(); ++t)
|
t != lcovFiles.end(); ++t)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found LCOV File: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< *t << std::endl);
|
"Found LCOV File: " << *t << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "SourceFile: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "SourceFile: "
|
||||||
<< sourceFile << std::endl);
|
<< sourceFile << std::endl, this->Quiet);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "lCovFile: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "lCovFile: "
|
||||||
<< lcovFile << std::endl);
|
<< lcovFile << std::endl, this->Quiet);
|
||||||
|
|
||||||
// If we have some LCOV files to process
|
// If we have some LCOV files to process
|
||||||
if ( !lcovFile.empty() && !actualSourceFile.empty() )
|
if ( !lcovFile.empty() && !actualSourceFile.empty() )
|
||||||
@ -1604,8 +1618,8 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
|||||||
cmCTestCoverageHandlerContainer::SingleFileCoverageVector& vec
|
cmCTestCoverageHandlerContainer::SingleFileCoverageVector& vec
|
||||||
= cont->TotalCoverage[actualSourceFile];
|
= cont->TotalCoverage[actualSourceFile];
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " in lcovFile: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< lcovFile << std::endl);
|
" in lcovFile: " << lcovFile << std::endl, this->Quiet);
|
||||||
|
|
||||||
cmsys::ifstream ifile(lcovFile.c_str());
|
cmsys::ifstream ifile(lcovFile.c_str());
|
||||||
if ( ! ifile )
|
if ( ! ifile )
|
||||||
@ -1620,8 +1634,8 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
|||||||
|
|
||||||
// Skip the first line
|
// Skip the first line
|
||||||
cmSystemTools::GetLineFromStream(ifile, nl);
|
cmSystemTools::GetLineFromStream(ifile, nl);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"File is ready, start reading." << std::endl);
|
"File is ready, start reading." << std::endl, this->Quiet);
|
||||||
while ( cmSystemTools::GetLineFromStream(ifile, nl) )
|
while ( cmSystemTools::GetLineFromStream(ifile, nl) )
|
||||||
{
|
{
|
||||||
cnt ++;
|
cnt ++;
|
||||||
@ -1679,9 +1693,10 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
|||||||
|
|
||||||
if ( file_count % 50 == 0 )
|
if ( file_count % 50 == 0 )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " processed: " << file_count
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< " out of " << files.size() << std::endl);
|
" processed: " << file_count << " out of " << files.size()
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
<< std::endl, this->Quiet);
|
||||||
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1707,8 +1722,8 @@ void cmCTestCoverageHandler::FindGCovFiles(std::vector<std::string>& files)
|
|||||||
|
|
||||||
// Coverage files appear next to their object files in the target
|
// Coverage files appear next to their object files in the target
|
||||||
// support directory.
|
// support directory.
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" globbing for coverage in: " << lmi->first << std::endl);
|
" globbing for coverage in: " << lmi->first << std::endl, this->Quiet);
|
||||||
std::string daGlob = lmi->first;
|
std::string daGlob = lmi->first;
|
||||||
daGlob += "/*.da";
|
daGlob += "/*.da";
|
||||||
gl.FindFiles(daGlob);
|
gl.FindFiles(daGlob);
|
||||||
@ -1740,12 +1755,12 @@ void cmCTestCoverageHandler::FindLCovFiles(std::vector<std::string>& files)
|
|||||||
std::string daGlob;
|
std::string daGlob;
|
||||||
daGlob = prevBinaryDir;
|
daGlob = prevBinaryDir;
|
||||||
daGlob += "/*.dpi";
|
daGlob += "/*.dpi";
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" looking for dpi files in: " << daGlob << std::endl);
|
" looking for dpi files in: " << daGlob << std::endl, this->Quiet);
|
||||||
gl.FindFiles(daGlob);
|
gl.FindFiles(daGlob);
|
||||||
files.insert(files.end(), gl.GetFiles().begin(), gl.GetFiles().end());
|
files.insert(files.end(), gl.GetFiles().begin(), gl.GetFiles().end());
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Now searching in: " << daGlob << std::endl);
|
"Now searching in: " << daGlob << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@ -1761,9 +1776,9 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
|
|||||||
|
|
||||||
if (files.empty())
|
if (files.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Cannot find any Python Trace.py coverage files."
|
" Cannot find any Python Trace.py coverage files."
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
// No coverage files is a valid thing, so the exit code is 0
|
// No coverage files is a valid thing, so the exit code is 0
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1791,13 +1806,13 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
|
|||||||
|
|
||||||
std::string actualSourceFile
|
std::string actualSourceFile
|
||||||
= cmSystemTools::CollapseFullPath(fileName);
|
= cmSystemTools::CollapseFullPath(fileName);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Check coverage for file: " << actualSourceFile
|
" Check coverage for file: " << actualSourceFile
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
cmCTestCoverageHandlerContainer::SingleFileCoverageVector* vec
|
cmCTestCoverageHandlerContainer::SingleFileCoverageVector* vec
|
||||||
= &cont->TotalCoverage[actualSourceFile];
|
= &cont->TotalCoverage[actualSourceFile];
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" in file: " << *fileIt << std::endl);
|
" in file: " << *fileIt << std::endl, this->Quiet);
|
||||||
cmsys::ifstream ifile(fileIt->c_str());
|
cmsys::ifstream ifile(fileIt->c_str());
|
||||||
if ( ! ifile )
|
if ( ! ifile )
|
||||||
{
|
{
|
||||||
@ -1850,9 +1865,9 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
|
|||||||
// So, this will be set to 0.
|
// So, this will be set to 0.
|
||||||
cov = 0;
|
cov = 0;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, DEBUG, "Prefix: " << prefix
|
cmCTestOptionalLog(this->CTest, DEBUG, "Prefix: " << prefix
|
||||||
<< " cov: " << cov
|
<< " cov: " << cov
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
// Read the line number starting at the 10th character of the gcov
|
// Read the line number starting at the 10th character of the gcov
|
||||||
// output line
|
// output line
|
||||||
long lineIdx = cnt;
|
long lineIdx = cnt;
|
||||||
@ -1945,18 +1960,16 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
|||||||
// for each file run covbr on that file to get the coverage
|
// for each file run covbr on that file to get the coverage
|
||||||
// information for that file
|
// information for that file
|
||||||
std::string outputFile;
|
std::string outputFile;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"run covbr: "
|
"run covbr: " << std::endl, this->Quiet);
|
||||||
<< std::endl);
|
|
||||||
|
|
||||||
if(!this->RunBullseyeCommand(cont, "covbr", 0, outputFile))
|
if(!this->RunBullseyeCommand(cont, "covbr", 0, outputFile))
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covbr for." << "\n");
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covbr for." << "\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"covbr output in " << outputFile
|
"covbr output in " << outputFile << std::endl, this->Quiet);
|
||||||
<< std::endl);
|
|
||||||
// open the output file
|
// open the output file
|
||||||
cmsys::ifstream fin(outputFile.c_str());
|
cmsys::ifstream fin(outputFile.c_str());
|
||||||
if(!fin)
|
if(!fin)
|
||||||
@ -2002,10 +2015,8 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
|||||||
// only allow 100 files in each log file
|
// only allow 100 files in each log file
|
||||||
if ( count != 0 && count % 100 == 0 )
|
if ( count != 0 && count % 100 == 0 )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"start a new log file: "
|
"start a new log file: " << count << std::endl, this->Quiet);
|
||||||
<< count
|
|
||||||
<< std::endl);
|
|
||||||
this->EndCoverageLogFile(covLogFile, logFileCount);
|
this->EndCoverageLogFile(covLogFile, logFileCount);
|
||||||
logFileCount ++;
|
logFileCount ++;
|
||||||
if ( !this->StartCoverageLogFile(covLogFile, logFileCount) )
|
if ( !this->StartCoverageLogFile(covLogFile, logFileCount) )
|
||||||
@ -2021,10 +2032,9 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
|||||||
{
|
{
|
||||||
// we have a new file so count it in the output
|
// we have a new file so count it in the output
|
||||||
count++;
|
count++;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Produce coverage for file: "
|
"Produce coverage for file: " << file << " " << count
|
||||||
<< file << " " << count
|
<< std::endl, this->Quiet);
|
||||||
<< std::endl);
|
|
||||||
// start the file output
|
// start the file output
|
||||||
covLogFile << "\t<File Name=\""
|
covLogFile << "\t<File Name=\""
|
||||||
<< cmXMLSafe(i->first)
|
<< cmXMLSafe(i->first)
|
||||||
@ -2083,13 +2093,13 @@ int cmCTestCoverageHandler::RunBullseyeCommand(
|
|||||||
}
|
}
|
||||||
if(arg)
|
if(arg)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Run : " << program << " " << arg << "\n");
|
"Run : " << program << " " << arg << "\n", this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Run : " << program << "\n");
|
"Run : " << program << "\n", this->Quiet);
|
||||||
}
|
}
|
||||||
// create a process object and start it
|
// create a process object and start it
|
||||||
cmCTestRunProcess runCoverageSrc;
|
cmCTestRunProcess runCoverageSrc;
|
||||||
@ -2215,17 +2225,17 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
|
|||||||
cont->BinaryDir.c_str());
|
cont->BinaryDir.c_str());
|
||||||
if ( !shouldIDoCoverage )
|
if ( !shouldIDoCoverage )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
".NoDartCoverage found, so skip coverage check for: "
|
".NoDartCoverage found, so skip coverage check for: "
|
||||||
<< file
|
<< file
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Doing coverage for: "
|
"Doing coverage for: "
|
||||||
<< file
|
<< file
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
|
|
||||||
coveredFiles.push_back(sourceFile);
|
coveredFiles.push_back(sourceFile);
|
||||||
coveredFilesFullPath.push_back(file);
|
coveredFilesFullPath.push_back(file);
|
||||||
@ -2328,23 +2338,23 @@ int cmCTestCoverageHandler::HandleBullseyeCoverage(
|
|||||||
const char* covfile = cmSystemTools::GetEnv("COVFILE");
|
const char* covfile = cmSystemTools::GetEnv("COVFILE");
|
||||||
if(!covfile || strlen(covfile) == 0)
|
if(!covfile || strlen(covfile) == 0)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" COVFILE environment variable not found, not running "
|
" COVFILE environment variable not found, not running "
|
||||||
" bullseye\n");
|
" bullseye\n", this->Quiet);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" run covsrc with COVFILE=["
|
" run covsrc with COVFILE=["
|
||||||
<< covfile
|
<< covfile
|
||||||
<< "]" << std::endl);
|
<< "]" << std::endl, this->Quiet);
|
||||||
if(!this->RunBullseyeSourceSummary(cont))
|
if(!this->RunBullseyeSourceSummary(cont))
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Error running bullseye summary.\n");
|
"Error running bullseye summary.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, DEBUG, "HandleBullseyeCoverage return 1 "
|
cmCTestOptionalLog(this->CTest, DEBUG, "HandleBullseyeCoverage return 1 "
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2438,8 +2448,8 @@ void cmCTestCoverageHandler::LoadLabels()
|
|||||||
std::string fileList = this->CTest->GetBinaryDir();
|
std::string fileList = this->CTest->GetBinaryDir();
|
||||||
fileList += cmake::GetCMakeFilesDirectory();
|
fileList += cmake::GetCMakeFilesDirectory();
|
||||||
fileList += "/TargetDirectories.txt";
|
fileList += "/TargetDirectories.txt";
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" target directory list [" << fileList << "]\n");
|
" target directory list [" << fileList << "]\n", this->Quiet);
|
||||||
cmsys::ifstream finList(fileList.c_str());
|
cmsys::ifstream finList(fileList.c_str());
|
||||||
std::string line;
|
std::string line;
|
||||||
while(cmSystemTools::GetLineFromStream(finList, line))
|
while(cmSystemTools::GetLineFromStream(finList, line))
|
||||||
@ -2460,8 +2470,8 @@ void cmCTestCoverageHandler::LoadLabels(const char* dir)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" loading labels from [" << fname << "]\n");
|
" loading labels from [" << fname << "]\n", this->Quiet);
|
||||||
bool inTarget = true;
|
bool inTarget = true;
|
||||||
std::string source;
|
std::string source;
|
||||||
std::string line;
|
std::string line;
|
||||||
|
@ -30,9 +30,10 @@ public:
|
|||||||
typedef std::map<std::string, SingleFileCoverageVector> TotalCoverageMap;
|
typedef std::map<std::string, SingleFileCoverageVector> TotalCoverageMap;
|
||||||
TotalCoverageMap TotalCoverage;
|
TotalCoverageMap TotalCoverage;
|
||||||
std::ostream* OFS;
|
std::ostream* OFS;
|
||||||
|
bool Quiet;
|
||||||
};
|
};
|
||||||
/** \class cmCTestCoverageHandler
|
/** \class cmCTestCoverageHandler
|
||||||
* \brief A class that handles coverage computaiton for ctest
|
* \brief A class that handles coverage computation for ctest
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class cmCTestCoverageHandler : public cmCTestGenericHandler
|
class cmCTestCoverageHandler : public cmCTestGenericHandler
|
||||||
|
@ -22,6 +22,7 @@ cmCTestGenericHandler::cmCTestGenericHandler()
|
|||||||
this->CTest = 0;
|
this->CTest = 0;
|
||||||
this->SubmitIndex = 0;
|
this->SubmitIndex = 0;
|
||||||
this->AppendXML = false;
|
this->AppendXML = false;
|
||||||
|
this->Quiet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -87,6 +87,8 @@ public:
|
|||||||
int GetSubmitIndex() { return this->SubmitIndex; }
|
int GetSubmitIndex() { return this->SubmitIndex; }
|
||||||
|
|
||||||
void SetAppendXML(bool b) { this->AppendXML = b; }
|
void SetAppendXML(bool b) { this->AppendXML = b; }
|
||||||
|
void SetQuiet(bool b) { this->Quiet = b; }
|
||||||
|
bool GetQuiet() { return this->Quiet; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool StartResultingXML(cmCTest::Part part,
|
bool StartResultingXML(cmCTest::Part part,
|
||||||
@ -94,6 +96,7 @@ protected:
|
|||||||
bool StartLogFile(const char* name, cmGeneratedFileStream& xofs);
|
bool StartLogFile(const char* name, cmGeneratedFileStream& xofs);
|
||||||
|
|
||||||
bool AppendXML;
|
bool AppendXML;
|
||||||
|
bool Quiet;
|
||||||
cmSystemTools::OutputOption HandlerVerbose;
|
cmSystemTools::OutputOption HandlerVerbose;
|
||||||
cmCTest *CTest;
|
cmCTest *CTest;
|
||||||
t_StringToString Options;
|
t_StringToString Options;
|
||||||
|
@ -29,6 +29,7 @@ cmCTestHandlerCommand::cmCTestHandlerCommand()
|
|||||||
this->Arguments[ct_SUBMIT_INDEX] = "SUBMIT_INDEX";
|
this->Arguments[ct_SUBMIT_INDEX] = "SUBMIT_INDEX";
|
||||||
this->Last = ct_LAST;
|
this->Last = ct_LAST;
|
||||||
this->AppendXML = false;
|
this->AppendXML = false;
|
||||||
|
this->Quiet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmCTestHandlerCommand
|
bool cmCTestHandlerCommand
|
||||||
@ -74,7 +75,7 @@ bool cmCTestHandlerCommand
|
|||||||
{
|
{
|
||||||
this->CTest->SetCTestConfiguration("BuildDirectory",
|
this->CTest->SetCTestConfiguration("BuildDirectory",
|
||||||
cmSystemTools::CollapseFullPath(
|
cmSystemTools::CollapseFullPath(
|
||||||
this->Values[ct_BUILD]).c_str());
|
this->Values[ct_BUILD]).c_str(), this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -84,7 +85,7 @@ bool cmCTestHandlerCommand
|
|||||||
{
|
{
|
||||||
this->
|
this->
|
||||||
CTest->SetCTestConfiguration("BuildDirectory",
|
CTest->SetCTestConfiguration("BuildDirectory",
|
||||||
cmSystemTools::CollapseFullPath(bdir).c_str());
|
cmSystemTools::CollapseFullPath(bdir).c_str(), this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -98,13 +99,14 @@ bool cmCTestHandlerCommand
|
|||||||
"Set source directory to: " << this->Values[ct_SOURCE] << std::endl);
|
"Set source directory to: " << this->Values[ct_SOURCE] << std::endl);
|
||||||
this->CTest->SetCTestConfiguration("SourceDirectory",
|
this->CTest->SetCTestConfiguration("SourceDirectory",
|
||||||
cmSystemTools::CollapseFullPath(
|
cmSystemTools::CollapseFullPath(
|
||||||
this->Values[ct_SOURCE]).c_str());
|
this->Values[ct_SOURCE]).c_str(), this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->CTest->SetCTestConfiguration("SourceDirectory",
|
this->CTest->SetCTestConfiguration("SourceDirectory",
|
||||||
cmSystemTools::CollapseFullPath(
|
cmSystemTools::CollapseFullPath(
|
||||||
this->Makefile->GetSafeDefinition("CTEST_SOURCE_DIRECTORY")).c_str());
|
this->Makefile->GetSafeDefinition("CTEST_SOURCE_DIRECTORY")).c_str(),
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl;);
|
cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl;);
|
||||||
@ -160,6 +162,12 @@ bool cmCTestHandlerCommand::CheckArgumentKeyword(std::string const& arg)
|
|||||||
this->AppendXML = true;
|
this->AppendXML = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if(arg == "QUIET")
|
||||||
|
{
|
||||||
|
this->ArgumentDoing = ArgumentDoingNone;
|
||||||
|
this->Quiet = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Check for a keyword in our argument/value table.
|
// Check for a keyword in our argument/value table.
|
||||||
for(unsigned int k=0; k < this->Arguments.size(); ++k)
|
for(unsigned int k=0; k < this->Arguments.size(); ++k)
|
||||||
|
@ -62,6 +62,7 @@ protected:
|
|||||||
unsigned int ArgumentIndex;
|
unsigned int ArgumentIndex;
|
||||||
|
|
||||||
bool AppendXML;
|
bool AppendXML;
|
||||||
|
bool Quiet;
|
||||||
|
|
||||||
std::string ReturnVariable;
|
std::string ReturnVariable;
|
||||||
std::vector<const char*> Arguments;
|
std::vector<const char*> Arguments;
|
||||||
|
@ -21,16 +21,20 @@ cmCTestGenericHandler* cmCTestMemCheckCommand::InitializeActualHandler()
|
|||||||
= this->CTest->GetInitializedHandler("memcheck");
|
= this->CTest->GetInitializedHandler("memcheck");
|
||||||
|
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"MemoryCheckType", "CTEST_MEMORYCHECK_TYPE");
|
"MemoryCheckType", "CTEST_MEMORYCHECK_TYPE", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"MemoryCheckSanitizerOptions", "CTEST_MEMORYCHECK_SANITIZER_OPTIONS");
|
"MemoryCheckSanitizerOptions", "CTEST_MEMORYCHECK_SANITIZER_OPTIONS",
|
||||||
|
this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"MemoryCheckCommand", "CTEST_MEMORYCHECK_COMMAND");
|
"MemoryCheckCommand", "CTEST_MEMORYCHECK_COMMAND", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"MemoryCheckCommandOptions", "CTEST_MEMORYCHECK_COMMAND_OPTIONS");
|
"MemoryCheckCommandOptions", "CTEST_MEMORYCHECK_COMMAND_OPTIONS",
|
||||||
|
this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"MemoryCheckSuppressionFile", "CTEST_MEMORYCHECK_SUPPRESSIONS_FILE");
|
"MemoryCheckSuppressionFile", "CTEST_MEMORYCHECK_SUPPRESSIONS_FILE",
|
||||||
|
this->Quiet);
|
||||||
|
|
||||||
|
handler->SetQuiet(this->Quiet);
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,8 +251,8 @@ void cmCTestMemCheckHandler::GenerateTestCommand(
|
|||||||
memcheckcommand += " " + memTesterEnvironmentVariable;
|
memcheckcommand += " " + memTesterEnvironmentVariable;
|
||||||
args.push_back(memTesterEnvironmentVariable);
|
args.push_back(memTesterEnvironmentVariable);
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Memory check command: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< memcheckcommand << std::endl);
|
"Memory check command: " << memcheckcommand << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@ -347,7 +347,8 @@ void cmCTestMemCheckHandler::PopulateCustomVectors(cmMakefile *mf)
|
|||||||
"CTEST_CUSTOM_MEMCHECK_IGNORE",
|
"CTEST_CUSTOM_MEMCHECK_IGNORE",
|
||||||
this->CustomTestsIgnore);
|
this->CustomTestsIgnore);
|
||||||
std::string cmake = cmSystemTools::GetCMakeCommand();
|
std::string cmake = cmSystemTools::GetCMakeCommand();
|
||||||
this->CTest->SetCTestConfiguration("CMakeCommand", cmake.c_str());
|
this->CTest->SetCTestConfiguration("CMakeCommand", cmake.c_str(),
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@ -400,8 +401,8 @@ void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os)
|
|||||||
<< "</Test>" << std::endl;
|
<< "</Test>" << std::endl;
|
||||||
}
|
}
|
||||||
os << "\t</TestList>\n";
|
os << "\t</TestList>\n";
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
"-- Processing memory checking output: ");
|
"-- Processing memory checking output: ", this->Quiet);
|
||||||
size_t total = this->TestResults.size();
|
size_t total = this->TestResults.size();
|
||||||
size_t step = total / 10;
|
size_t step = total / 10;
|
||||||
size_t current = 0;
|
size_t current = 0;
|
||||||
@ -451,13 +452,14 @@ void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os)
|
|||||||
this->WriteTestResultFooter(os, result);
|
this->WriteTestResultFooter(os, result);
|
||||||
if ( current < cc )
|
if ( current < cc )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "#" << std::flush);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "#" << std::flush,
|
||||||
|
this->Quiet);
|
||||||
current += step;
|
current += step;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl, this->Quiet);
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "Memory checking results:"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Memory checking results:"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
os << "\t<DefectList>" << std::endl;
|
os << "\t<DefectList>" << std::endl;
|
||||||
for ( cc = 0; cc < this->GlobalResults.size(); cc ++ )
|
for ( cc = 0; cc < this->GlobalResults.size(); cc ++ )
|
||||||
{
|
{
|
||||||
@ -468,9 +470,9 @@ void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os)
|
|||||||
#endif
|
#endif
|
||||||
std::cerr.width(35);
|
std::cerr.width(35);
|
||||||
#define cerr no_cerr
|
#define cerr no_cerr
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->ResultStringsLong[cc] << " - "
|
this->ResultStringsLong[cc] << " - "
|
||||||
<< this->GlobalResults[cc] << std::endl);
|
<< this->GlobalResults[cc] << std::endl, this->Quiet);
|
||||||
os << "\t\t<Defect Type=\"" << this->ResultStringsLong[cc]
|
os << "\t\t<Defect Type=\"" << this->ResultStringsLong[cc]
|
||||||
<< "\"/>" << std::endl;
|
<< "\"/>" << std::endl;
|
||||||
}
|
}
|
||||||
@ -594,10 +596,10 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
|
|||||||
}
|
}
|
||||||
if(this->MemoryTester.empty())
|
if(this->MemoryTester.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, WARNING,
|
cmCTestOptionalLog(this->CTest, WARNING,
|
||||||
"Memory checker (MemoryCheckCommand) "
|
"Memory checker (MemoryCheckCommand) "
|
||||||
"not set, or cannot find the specified program."
|
"not set, or cannot find the specified program."
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -981,17 +983,18 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
|
|||||||
"locked by a different thread");
|
"locked by a different thread");
|
||||||
std::vector<std::string::size_type> nonValGrindOutput;
|
std::vector<std::string::size_type> nonValGrindOutput;
|
||||||
double sttime = cmSystemTools::GetTime();
|
double sttime = cmSystemTools::GetTime();
|
||||||
cmCTestLog(this->CTest, DEBUG, "Start test: " << lines.size() << std::endl);
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
|
"Start test: " << lines.size() << std::endl, this->Quiet);
|
||||||
std::string::size_type totalOutputSize = 0;
|
std::string::size_type totalOutputSize = 0;
|
||||||
for ( cc = 0; cc < lines.size(); cc ++ )
|
for ( cc = 0; cc < lines.size(); cc ++ )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "test line "
|
cmCTestOptionalLog(this->CTest, DEBUG, "test line "
|
||||||
<< lines[cc] << std::endl);
|
<< lines[cc] << std::endl, this->Quiet);
|
||||||
|
|
||||||
if ( valgrindLine.find(lines[cc]) )
|
if ( valgrindLine.find(lines[cc]) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "valgrind line "
|
cmCTestOptionalLog(this->CTest, DEBUG, "valgrind line "
|
||||||
<< lines[cc] << std::endl);
|
<< lines[cc] << std::endl, this->Quiet);
|
||||||
int failure = cmCTestMemCheckHandler::NO_MEMORY_FAULT;
|
int failure = cmCTestMemCheckHandler::NO_MEMORY_FAULT;
|
||||||
if ( vgFIM.find(lines[cc]) )
|
if ( vgFIM.find(lines[cc]) )
|
||||||
{
|
{
|
||||||
@ -1075,10 +1078,10 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
|
|||||||
nonValGrindOutput.begin(); i != nonValGrindOutput.end(); ++i)
|
nonValGrindOutput.begin(); i != nonValGrindOutput.end(); ++i)
|
||||||
{
|
{
|
||||||
totalOutputSize += lines[*i].size();
|
totalOutputSize += lines[*i].size();
|
||||||
cmCTestLog(this->CTest, DEBUG, "before xml safe "
|
cmCTestOptionalLog(this->CTest, DEBUG, "before xml safe "
|
||||||
<< lines[*i] << std::endl);
|
<< lines[*i] << std::endl, this->Quiet);
|
||||||
cmCTestLog(this->CTest, DEBUG, "after xml safe "
|
cmCTestOptionalLog(this->CTest, DEBUG, "after xml safe "
|
||||||
<< cmXMLSafe(lines[*i]) << std::endl);
|
<< cmXMLSafe(lines[*i]) << std::endl, this->Quiet);
|
||||||
ostr << cmXMLSafe(lines[*i]) << std::endl;
|
ostr << cmXMLSafe(lines[*i]) << std::endl;
|
||||||
if(!unlimitedOutput && totalOutputSize >
|
if(!unlimitedOutput && totalOutputSize >
|
||||||
static_cast<size_t>(this->CustomMaximumFailedTestOutputSize))
|
static_cast<size_t>(this->CustomMaximumFailedTestOutputSize))
|
||||||
@ -1091,8 +1094,8 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
|
|||||||
break; // stop the copy of output if we are full
|
break; // stop the copy of output if we are full
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, DEBUG, "End test (elapsed: "
|
cmCTestOptionalLog(this->CTest, DEBUG, "End test (elapsed: "
|
||||||
<< (cmSystemTools::GetTime() - sttime) << std::endl);
|
<< (cmSystemTools::GetTime() - sttime) << std::endl, this->Quiet);
|
||||||
log = ostr.str();
|
log = ostr.str();
|
||||||
if ( defects )
|
if ( defects )
|
||||||
{
|
{
|
||||||
@ -1112,7 +1115,8 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput(
|
|||||||
double sttime = cmSystemTools::GetTime();
|
double sttime = cmSystemTools::GetTime();
|
||||||
std::vector<std::string> lines;
|
std::vector<std::string> lines;
|
||||||
cmSystemTools::Split(str.c_str(), lines);
|
cmSystemTools::Split(str.c_str(), lines);
|
||||||
cmCTestLog(this->CTest, DEBUG, "Start test: " << lines.size() << std::endl);
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
|
"Start test: " << lines.size() << std::endl, this->Quiet);
|
||||||
std::vector<std::string>::size_type cc;
|
std::vector<std::string>::size_type cc;
|
||||||
for ( cc = 0; cc < lines.size(); cc ++ )
|
for ( cc = 0; cc < lines.size(); cc ++ )
|
||||||
{
|
{
|
||||||
@ -1148,8 +1152,8 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput(
|
|||||||
results[parser.Errors[cc]]++;
|
results[parser.Errors[cc]]++;
|
||||||
defects++;
|
defects++;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, DEBUG, "End test (elapsed: "
|
cmCTestOptionalLog(this->CTest, DEBUG, "End test (elapsed: "
|
||||||
<< (cmSystemTools::GetTime() - sttime) << std::endl);
|
<< (cmSystemTools::GetTime() - sttime) << std::endl, this->Quiet);
|
||||||
if(defects)
|
if(defects)
|
||||||
{
|
{
|
||||||
// only put the output of Bounds Checker if there were
|
// only put the output of Bounds Checker if there were
|
||||||
@ -1165,9 +1169,9 @@ void
|
|||||||
cmCTestMemCheckHandler::PostProcessTest(cmCTestTestResult& res,
|
cmCTestMemCheckHandler::PostProcessTest(cmCTestTestResult& res,
|
||||||
int test)
|
int test)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"PostProcessTest memcheck results for : "
|
"PostProcessTest memcheck results for : "
|
||||||
<< res.Name << std::endl);
|
<< res.Name << std::endl, this->Quiet);
|
||||||
if(this->MemoryTesterStyle
|
if(this->MemoryTesterStyle
|
||||||
== cmCTestMemCheckHandler::BOUNDS_CHECKER)
|
== cmCTestMemCheckHandler::BOUNDS_CHECKER)
|
||||||
{
|
{
|
||||||
@ -1192,9 +1196,9 @@ void
|
|||||||
cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
|
cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
|
||||||
int test)
|
int test)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"PostProcessBoundsCheckerTest for : "
|
"PostProcessBoundsCheckerTest for : "
|
||||||
<< res.Name << std::endl);
|
<< res.Name << std::endl, this->Quiet);
|
||||||
std::vector<std::string> files;
|
std::vector<std::string> files;
|
||||||
this->TestOutputFileNames(test, files);
|
this->TestOutputFileNames(test, files);
|
||||||
if (files.empty())
|
if (files.empty())
|
||||||
@ -1226,11 +1230,11 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
|
|||||||
}
|
}
|
||||||
cmSystemTools::Delay(1000);
|
cmSystemTools::Delay(1000);
|
||||||
cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile);
|
cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
|
||||||
<< this->BoundsCheckerDPBDFile << std::endl);
|
<< this->BoundsCheckerDPBDFile << std::endl, this->Quiet);
|
||||||
cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile);
|
cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
|
||||||
<< this->BoundsCheckerXMLFile << std::endl);
|
<< this->BoundsCheckerXMLFile << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1260,7 +1264,8 @@ cmCTestMemCheckHandler::AppendMemTesterOutput(cmCTestTestResult& res,
|
|||||||
if(this->LogWithPID)
|
if(this->LogWithPID)
|
||||||
{
|
{
|
||||||
cmSystemTools::RemoveFile(ofile);
|
cmSystemTools::RemoveFile(ofile);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "<< ofile <<"\n");
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
|
"Remove: "<< ofile <<"\n", this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +113,8 @@ void cmCTestMultiProcessHandler::RunTests()
|
|||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
void cmCTestMultiProcessHandler::StartTestProcess(int test)
|
void cmCTestMultiProcessHandler::StartTestProcess(int test)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "test " << test << "\n");
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
|
"test " << test << "\n", this->Quiet);
|
||||||
this->TestRunningMap[test] = true; // mark the test as running
|
this->TestRunningMap[test] = true; // mark the test as running
|
||||||
// now remove the test itself
|
// now remove the test itself
|
||||||
this->EraseTest(test);
|
this->EraseTest(test);
|
||||||
@ -639,39 +640,44 @@ void cmCTestMultiProcessHandler::PrintTestList()
|
|||||||
|
|
||||||
if(!p.Labels.empty()) //print the labels
|
if(!p.Labels.empty()) //print the labels
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Labels:");
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Labels:",
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
for(std::vector<std::string>::iterator label = p.Labels.begin();
|
for(std::vector<std::string>::iterator label = p.Labels.begin();
|
||||||
label != p.Labels.end(); ++label)
|
label != p.Labels.end(); ++label)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " " << *label);
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " " << *label,
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
if(!p.Labels.empty()) //print the labels
|
if(!p.Labels.empty()) //print the labels
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl,
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->TestHandler->MemCheck)
|
if (this->TestHandler->MemCheck)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Memory Check");
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Memory Check",
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Test");
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Test", this->Quiet);
|
||||||
}
|
}
|
||||||
std::ostringstream indexStr;
|
std::ostringstream indexStr;
|
||||||
indexStr << " #" << p.Index << ":";
|
indexStr << " #" << p.Index << ":";
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex()))
|
std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex()))
|
||||||
<< indexStr.str());
|
<< indexStr.str(), this->Quiet);
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, p.Name.c_str() << std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
p.Name.c_str() << std::endl, this->Quiet);
|
||||||
//pop working dir
|
//pop working dir
|
||||||
cmSystemTools::ChangeDirectory(current_dir);
|
cmSystemTools::ChangeDirectory(current_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl << "Total Tests: "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl << "Total Tests: "
|
||||||
<< this->Total << std::endl);
|
<< this->Total << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmCTestMultiProcessHandler::PrintLabels()
|
void cmCTestMultiProcessHandler::PrintLabels()
|
||||||
@ -686,16 +692,19 @@ void cmCTestMultiProcessHandler::PrintLabels()
|
|||||||
|
|
||||||
if(!allLabels.empty())
|
if(!allLabels.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "All Labels:" << std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
"All Labels:" << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "No Labels Exist" << std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
"No Labels Exist" << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
for(std::set<std::string>::iterator label = allLabels.begin();
|
for(std::set<std::string>::iterator label = allLabels.begin();
|
||||||
label != allLabels.end(); ++label)
|
label != allLabels.end(); ++label)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " " << *label << std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
" " << *label << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -758,8 +767,8 @@ int cmCTestMultiProcessHandler::FindMaxIndex()
|
|||||||
//Returns true if no cycles exist in the dependency graph
|
//Returns true if no cycles exist in the dependency graph
|
||||||
bool cmCTestMultiProcessHandler::CheckCycles()
|
bool cmCTestMultiProcessHandler::CheckCycles()
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Checking test dependency graph..." << std::endl);
|
"Checking test dependency graph..." << std::endl, this->Quiet);
|
||||||
for(TestMap::iterator it = this->Tests.begin();
|
for(TestMap::iterator it = this->Tests.begin();
|
||||||
it != this->Tests.end(); ++it)
|
it != this->Tests.end(); ++it)
|
||||||
{
|
{
|
||||||
@ -794,7 +803,7 @@ bool cmCTestMultiProcessHandler::CheckCycles()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Checking test dependency graph end" << std::endl);
|
"Checking test dependency graph end" << std::endl, this->Quiet);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,8 @@ public:
|
|||||||
|
|
||||||
cmCTestTestHandler * GetTestHandler()
|
cmCTestTestHandler * GetTestHandler()
|
||||||
{ return this->TestHandler; }
|
{ return this->TestHandler; }
|
||||||
|
|
||||||
|
void SetQuiet(bool b) { this->Quiet = b; }
|
||||||
protected:
|
protected:
|
||||||
// Start the next test or tests as many as are allowed by
|
// Start the next test or tests as many as are allowed by
|
||||||
// ParallelLevel
|
// ParallelLevel
|
||||||
@ -118,6 +120,7 @@ protected:
|
|||||||
cmCTestTestHandler * TestHandler;
|
cmCTestTestHandler * TestHandler;
|
||||||
cmCTest* CTest;
|
cmCTest* CTest;
|
||||||
bool HasCycles;
|
bool HasCycles;
|
||||||
|
bool Quiet;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -386,10 +386,11 @@ void cmCTestRunTest::MemCheckPostProcess()
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
|
||||||
<< ": process test output now: "
|
<< ": process test output now: "
|
||||||
<< this->TestProperties->Name << " "
|
<< this->TestProperties->Name << " "
|
||||||
<< this->TestResult.Name << std::endl);
|
<< this->TestResult.Name << std::endl,
|
||||||
|
this->TestHandler->GetQuiet());
|
||||||
cmCTestMemCheckHandler * handler = static_cast<cmCTestMemCheckHandler*>
|
cmCTestMemCheckHandler * handler = static_cast<cmCTestMemCheckHandler*>
|
||||||
(this->TestHandler);
|
(this->TestHandler);
|
||||||
handler->PostProcessTest(this->TestResult, this->Index);
|
handler->PostProcessTest(this->TestResult, this->Index);
|
||||||
@ -661,8 +662,9 @@ bool cmCTestRunTest::ForkProcess(double testTimeOut, bool explicitTimeout,
|
|||||||
{
|
{
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ": "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ": "
|
||||||
<< "Test timeout computed to be: " << timeout << "\n");
|
<< "Test timeout computed to be: " << timeout << "\n",
|
||||||
|
this->TestHandler->GetQuiet());
|
||||||
|
|
||||||
this->TestProcess->SetTimeout(timeout);
|
this->TestProcess->SetTimeout(timeout);
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
cmCTestStartCommand::cmCTestStartCommand()
|
cmCTestStartCommand::cmCTestStartCommand()
|
||||||
{
|
{
|
||||||
this->CreateNewTag = true;
|
this->CreateNewTag = true;
|
||||||
|
this->Quiet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmCTestStartCommand
|
bool cmCTestStartCommand
|
||||||
@ -57,6 +58,14 @@ bool cmCTestStartCommand
|
|||||||
this->CreateNewTag = false;
|
this->CreateNewTag = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (cnt < args.size())
|
||||||
|
{
|
||||||
|
if (args[cnt] == "QUIET")
|
||||||
|
{
|
||||||
|
cnt ++;
|
||||||
|
this->Quiet = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( cnt < args.size() )
|
if ( cnt < args.size() )
|
||||||
{
|
{
|
||||||
@ -95,18 +104,20 @@ bool cmCTestStartCommand
|
|||||||
|
|
||||||
std::string sourceDir = cmSystemTools::CollapseFullPath(src_dir);
|
std::string sourceDir = cmSystemTools::CollapseFullPath(src_dir);
|
||||||
std::string binaryDir = cmSystemTools::CollapseFullPath(bld_dir);
|
std::string binaryDir = cmSystemTools::CollapseFullPath(bld_dir);
|
||||||
this->CTest->SetCTestConfiguration("SourceDirectory", sourceDir.c_str());
|
this->CTest->SetCTestConfiguration("SourceDirectory", sourceDir.c_str(),
|
||||||
this->CTest->SetCTestConfiguration("BuildDirectory", binaryDir.c_str());
|
this->Quiet);
|
||||||
|
this->CTest->SetCTestConfiguration("BuildDirectory", binaryDir.c_str(),
|
||||||
|
this->Quiet);
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with model "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with model "
|
||||||
<< smodel << std::endl
|
<< smodel << std::endl
|
||||||
<< " Source directory: " << src_dir << std::endl
|
<< " Source directory: " << src_dir << std::endl
|
||||||
<< " Build directory: " << bld_dir << std::endl);
|
<< " Build directory: " << bld_dir << std::endl, this->Quiet);
|
||||||
const char* track = this->CTest->GetSpecificTrack();
|
const char* track = this->CTest->GetSpecificTrack();
|
||||||
if ( track )
|
if ( track )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
" Track: " << track << std::endl);
|
" Track: " << track << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log startup actions.
|
// Log startup actions.
|
||||||
|
@ -34,6 +34,7 @@ public:
|
|||||||
ni->CTest = this->CTest;
|
ni->CTest = this->CTest;
|
||||||
ni->CTestScriptHandler = this->CTestScriptHandler;
|
ni->CTestScriptHandler = this->CTestScriptHandler;
|
||||||
ni->CreateNewTag = this->CreateNewTag;
|
ni->CreateNewTag = this->CreateNewTag;
|
||||||
|
ni->Quiet = this->Quiet;
|
||||||
return ni;
|
return ni;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,6 +53,14 @@ public:
|
|||||||
return this->CreateNewTag;
|
return this->CreateNewTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should this invocation of ctest_start output non-error messages?
|
||||||
|
*/
|
||||||
|
bool ShouldBeQuiet()
|
||||||
|
{
|
||||||
|
return this->Quiet;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
@ -62,6 +71,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
|
bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
|
||||||
bool CreateNewTag;
|
bool CreateNewTag;
|
||||||
|
bool Quiet;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,29 +44,33 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
|
|||||||
// error: CDash requires CTEST_DROP_LOCATION definition
|
// error: CDash requires CTEST_DROP_LOCATION definition
|
||||||
// in CTestConfig.cmake
|
// in CTestConfig.cmake
|
||||||
}
|
}
|
||||||
this->CTest->SetCTestConfiguration("ProjectName", ctestProjectName);
|
this->CTest->SetCTestConfiguration("ProjectName", ctestProjectName,
|
||||||
this->CTest->SetCTestConfiguration("DropMethod", ctestDropMethod);
|
this->Quiet);
|
||||||
this->CTest->SetCTestConfiguration("DropSite", ctestDropSite);
|
this->CTest->SetCTestConfiguration("DropMethod", ctestDropMethod,
|
||||||
this->CTest->SetCTestConfiguration("DropLocation", ctestDropLocation);
|
this->Quiet);
|
||||||
|
this->CTest->SetCTestConfiguration("DropSite", ctestDropSite, this->Quiet);
|
||||||
|
this->CTest->SetCTestConfiguration("DropLocation", ctestDropLocation,
|
||||||
|
this->Quiet);
|
||||||
|
|
||||||
this->CTest->SetCTestConfiguration("IsCDash",
|
this->CTest->SetCTestConfiguration("IsCDash",
|
||||||
ctestDropSiteCDash ? "TRUE" : "FALSE");
|
ctestDropSiteCDash ? "TRUE" : "FALSE", this->Quiet);
|
||||||
|
|
||||||
// Only propagate TriggerSite for non-CDash projects:
|
// Only propagate TriggerSite for non-CDash projects:
|
||||||
//
|
//
|
||||||
if ( !ctestDropSiteCDash )
|
if ( !ctestDropSiteCDash )
|
||||||
{
|
{
|
||||||
this->CTest->SetCTestConfiguration("TriggerSite", ctestTriggerSite);
|
this->CTest->SetCTestConfiguration("TriggerSite", ctestTriggerSite,
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"CurlOptions", "CTEST_CURL_OPTIONS");
|
"CurlOptions", "CTEST_CURL_OPTIONS", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"DropSiteUser", "CTEST_DROP_SITE_USER");
|
"DropSiteUser", "CTEST_DROP_SITE_USER", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"DropSitePassword", "CTEST_DROP_SITE_PASSWORD");
|
"DropSitePassword", "CTEST_DROP_SITE_PASSWORD", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"ScpCommand", "CTEST_SCP_COMMAND");
|
"ScpCommand", "CTEST_SCP_COMMAND", this->Quiet);
|
||||||
|
|
||||||
const char* notesFilesVariable
|
const char* notesFilesVariable
|
||||||
= this->Makefile->GetDefinition("CTEST_NOTES_FILES");
|
= this->Makefile->GetDefinition("CTEST_NOTES_FILES");
|
||||||
@ -145,6 +149,8 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
|
|||||||
static_cast<cmCTestSubmitHandler*>(handler)->SetOption("InternalTest",
|
static_cast<cmCTestSubmitHandler*>(handler)->SetOption("InternalTest",
|
||||||
this->InternalTest ? "ON" : "OFF");
|
this->InternalTest ? "ON" : "OFF");
|
||||||
|
|
||||||
|
handler->SetQuiet(this->Quiet);
|
||||||
|
|
||||||
if (this->CDashUpload)
|
if (this->CDashUpload)
|
||||||
{
|
{
|
||||||
static_cast<cmCTestSubmitHandler*>(handler)->
|
static_cast<cmCTestSubmitHandler*>(handler)->
|
||||||
|
@ -242,9 +242,9 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
|||||||
ftpfile = cmsys::SystemTools::Fopen(local_file, "rb");
|
ftpfile = cmsys::SystemTools::Fopen(local_file, "rb");
|
||||||
*this->LogFile << "\tUpload file: " << local_file << " to "
|
*this->LogFile << "\tUpload file: " << local_file << " to "
|
||||||
<< upload_as << std::endl;
|
<< upload_as << std::endl;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< local_file << " to "
|
" Upload file: " << local_file << " to " << upload_as << std::endl,
|
||||||
<< upload_as << std::endl);
|
this->Quiet);
|
||||||
|
|
||||||
::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||||
|
|
||||||
@ -278,15 +278,15 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
|||||||
|
|
||||||
if (!chunk.empty())
|
if (!chunk.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "CURL output: ["
|
cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
if (!chunkDebug.empty())
|
if (!chunkDebug.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "CURL debug output: ["
|
cmCTestOptionalLog(this->CTest, DEBUG, "CURL debug output: ["
|
||||||
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(ftpfile);
|
fclose(ftpfile);
|
||||||
@ -318,8 +318,8 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
|||||||
}
|
}
|
||||||
// always cleanup
|
// always cleanup
|
||||||
::curl_easy_cleanup(curl);
|
::curl_easy_cleanup(curl);
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Uploaded: " + local_file
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< std::endl);
|
" Uploaded: " + local_file << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::curl_global_cleanup();
|
::curl_global_cleanup();
|
||||||
@ -369,14 +369,14 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
cmCurlSetCAInfo(curl);
|
cmCurlSetCAInfo(curl);
|
||||||
if(verifyPeerOff)
|
if(verifyPeerOff)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Set CURLOPT_SSL_VERIFYPEER to off\n");
|
" Set CURLOPT_SSL_VERIFYPEER to off\n", this->Quiet);
|
||||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
}
|
}
|
||||||
if(verifyHostOff)
|
if(verifyHostOff)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Set CURLOPT_SSL_VERIFYHOST to off\n");
|
" Set CURLOPT_SSL_VERIFYHOST to off\n", this->Quiet);
|
||||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -482,9 +482,9 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
unsigned long filelen = cmSystemTools::FileLength(local_file);
|
unsigned long filelen = cmSystemTools::FileLength(local_file);
|
||||||
|
|
||||||
ftpfile = cmsys::SystemTools::Fopen(local_file, "rb");
|
ftpfile = cmsys::SystemTools::Fopen(local_file, "rb");
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< local_file << " to "
|
" Upload file: " << local_file << " to "
|
||||||
<< upload_as << " Size: " << filelen << std::endl);
|
<< upload_as << " Size: " << filelen << std::endl, this->Quiet);
|
||||||
|
|
||||||
// specify target
|
// specify target
|
||||||
::curl_easy_setopt(curl,CURLOPT_URL, upload_as.c_str());
|
::curl_easy_setopt(curl,CURLOPT_URL, upload_as.c_str());
|
||||||
@ -529,16 +529,16 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
|
|
||||||
if (!chunk.empty())
|
if (!chunk.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "CURL output: ["
|
cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
this->ParseResponse(chunk);
|
this->ParseResponse(chunk);
|
||||||
}
|
}
|
||||||
if (!chunkDebug.empty())
|
if (!chunkDebug.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "CURL debug output: ["
|
cmCTestOptionalLog(this->CTest, DEBUG, "CURL debug output: ["
|
||||||
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If curl failed for any reason, or checksum fails, wait and retry
|
// If curl failed for any reason, or checksum fails, wait and retry
|
||||||
@ -557,8 +557,9 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
|
|
||||||
for(int i = 0; i < count; i++)
|
for(int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
" Submit failed, waiting " << delay << " seconds...\n");
|
" Submit failed, waiting " << delay << " seconds...\n",
|
||||||
|
this->Quiet);
|
||||||
|
|
||||||
double stop = cmSystemTools::GetTime() + delay;
|
double stop = cmSystemTools::GetTime() + delay;
|
||||||
while(cmSystemTools::GetTime() < stop)
|
while(cmSystemTools::GetTime() < stop)
|
||||||
@ -566,9 +567,9 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
cmSystemTools::Delay(100);
|
cmSystemTools::Delay(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
" Retry submission: Attempt " << (i + 1) << " of "
|
" Retry submission: Attempt " << (i + 1) << " of "
|
||||||
<< count << std::endl);
|
<< count << std::endl, this->Quiet);
|
||||||
|
|
||||||
::fclose(ftpfile);
|
::fclose(ftpfile);
|
||||||
ftpfile = cmsys::SystemTools::Fopen(local_file, "rb");
|
ftpfile = cmsys::SystemTools::Fopen(local_file, "rb");
|
||||||
@ -582,9 +583,9 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
|
|
||||||
if (!chunk.empty())
|
if (!chunk.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "CURL output: ["
|
cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
this->ParseResponse(chunk);
|
this->ParseResponse(chunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -624,8 +625,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
}
|
}
|
||||||
// always cleanup
|
// always cleanup
|
||||||
::curl_easy_cleanup(curl);
|
::curl_easy_cleanup(curl);
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Uploaded: " + local_file
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< std::endl);
|
" Uploaded: " + local_file << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::curl_global_cleanup();
|
::curl_global_cleanup();
|
||||||
@ -677,6 +678,7 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(
|
|||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
char error_buffer[1024];
|
char error_buffer[1024];
|
||||||
|
|
||||||
/* In windows, this will init the winsock stuff */
|
/* In windows, this will init the winsock stuff */
|
||||||
::curl_global_init(CURL_GLOBAL_ALL);
|
::curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
|
||||||
@ -756,8 +758,8 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(
|
|||||||
= url + ((url.find("?",0) == std::string::npos) ? "?" : "&")
|
= url + ((url.find("?",0) == std::string::npos) ? "?" : "&")
|
||||||
+ "xmlfile=" + ofile;
|
+ "xmlfile=" + ofile;
|
||||||
*this->LogFile << "Trigger url: " << turl << std::endl;
|
*this->LogFile << "Trigger url: " << turl << std::endl;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Trigger url: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< turl << std::endl);
|
" Trigger url: " << turl << std::endl, this->Quiet);
|
||||||
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, turl.c_str());
|
curl_easy_setopt(curl, CURLOPT_URL, turl.c_str());
|
||||||
if ( curl_easy_perform(curl) )
|
if ( curl_easy_perform(curl) )
|
||||||
@ -786,25 +788,26 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(
|
|||||||
|
|
||||||
if (!chunk.empty())
|
if (!chunk.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "CURL output: ["
|
cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
if (!chunkDebug.empty())
|
if (!chunkDebug.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "CURL debug output: ["
|
cmCTestOptionalLog(this->CTest, DEBUG, "CURL debug output: ["
|
||||||
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size())
|
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size())
|
||||||
<< "]" << std::endl);
|
<< "]" << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
// always cleanup
|
// always cleanup
|
||||||
::curl_easy_cleanup(curl);
|
::curl_easy_cleanup(curl);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl);
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl,
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::curl_global_cleanup();
|
::curl_global_cleanup();
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Dart server triggered..."
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Dart server triggered..."
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -821,6 +824,7 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<const char*> argv;
|
std::vector<const char*> argv;
|
||||||
argv.push_back(scp_command.c_str()); // Scp command
|
argv.push_back(scp_command.c_str()); // Scp command
|
||||||
argv.push_back(scp_command.c_str()); // Dummy string for file
|
argv.push_back(scp_command.c_str()); // Dummy string for file
|
||||||
@ -845,9 +849,9 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(
|
|||||||
argv[1] = lfname.c_str();
|
argv[1] = lfname.c_str();
|
||||||
std::string rfname = url + "/" + remoteprefix + *file;
|
std::string rfname = url + "/" + remoteprefix + *file;
|
||||||
argv[2] = rfname.c_str();
|
argv[2] = rfname.c_str();
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Execute \"" << argv[0]
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< "\" \"" << argv[1] << "\" \""
|
"Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \""
|
||||||
<< argv[2] << "\"" << std::endl);
|
<< argv[2] << "\"" << std::endl, this->Quiet);
|
||||||
*this->LogFile << "Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \""
|
*this->LogFile << "Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \""
|
||||||
<< argv[2] << "\"" << std::endl;
|
<< argv[2] << "\"" << std::endl;
|
||||||
|
|
||||||
@ -858,8 +862,8 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(
|
|||||||
|
|
||||||
while(cmsysProcess_WaitForData(cp, &data, &length, 0))
|
while(cmsysProcess_WaitForData(cp, &data, &length, 0))
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
cmCTestLogWrite(data, length));
|
cmCTestLogWrite(data, length), this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmsysProcess_WaitForExit(cp, 0);
|
cmsysProcess_WaitForExit(cp, 0);
|
||||||
@ -871,8 +875,8 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(
|
|||||||
retVal = cmsysProcess_GetExitValue(cp);
|
retVal = cmsysProcess_GetExitValue(cp);
|
||||||
if ( retVal != 0 )
|
if ( retVal != 0 )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "\tSCP returned: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< retVal << std::endl);
|
"\tSCP returned: " << retVal << std::endl, this->Quiet);
|
||||||
*this->LogFile << "\tSCP returned: " << retVal << std::endl;
|
*this->LogFile << "\tSCP returned: " << retVal << std::endl;
|
||||||
problems ++;
|
problems ++;
|
||||||
}
|
}
|
||||||
@ -927,6 +931,7 @@ bool cmCTestSubmitHandler::SubmitUsingCP(
|
|||||||
<< "\tdestination: " << destination << std::endl);
|
<< "\tdestination: " << destination << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTest::SetOfStrings::const_iterator file;
|
cmCTest::SetOfStrings::const_iterator file;
|
||||||
bool problems = false;
|
bool problems = false;
|
||||||
for ( file = files.begin(); file != files.end(); ++file )
|
for ( file = files.begin(); file != files.end(); ++file )
|
||||||
@ -936,9 +941,9 @@ bool cmCTestSubmitHandler::SubmitUsingCP(
|
|||||||
lfname += "/" + *file;
|
lfname += "/" + *file;
|
||||||
std::string rfname = destination + "/" + remoteprefix + *file;
|
std::string rfname = destination + "/" + remoteprefix + *file;
|
||||||
cmSystemTools::CopyFileAlways(lfname, rfname);
|
cmSystemTools::CopyFileAlways(lfname, rfname);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Copy file: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Copy file: "
|
||||||
<< lfname << " to "
|
<< lfname << " to "
|
||||||
<< rfname << std::endl);
|
<< rfname << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
|
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
|
||||||
cmSystemTools::Touch(tagDoneFile, true);
|
cmSystemTools::Touch(tagDoneFile, true);
|
||||||
@ -971,8 +976,9 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const std::string& localprefix,
|
|||||||
xmlrpc_env_init(&env);
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
/* Call the famous server at UserLand. */
|
/* Call the famous server at UserLand. */
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submitting to: "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Submitting to: "
|
||||||
<< realURL.c_str() << " (" << remoteprefix.c_str() << ")" << std::endl);
|
<< realURL.c_str() << " (" << remoteprefix.c_str() << ")" << std::endl,
|
||||||
|
this->Quiet);
|
||||||
cmCTest::SetOfStrings::const_iterator file;
|
cmCTest::SetOfStrings::const_iterator file;
|
||||||
for ( file = files.begin(); file != files.end(); ++file )
|
for ( file = files.begin(); file != files.end(); ++file )
|
||||||
{
|
{
|
||||||
@ -983,8 +989,8 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const std::string& localprefix,
|
|||||||
{
|
{
|
||||||
local_file = localprefix + "/" + *file;
|
local_file = localprefix + "/" + *file;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submit file: "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Submit file: "
|
||||||
<< local_file.c_str() << std::endl);
|
<< local_file.c_str() << std::endl, this->Quiet);
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if ( ::stat(local_file.c_str(), &st) )
|
if ( ::stat(local_file.c_str(), &st) )
|
||||||
{
|
{
|
||||||
@ -1068,12 +1074,14 @@ void cmCTestSubmitHandler::ConstructCDashURL(std::string& dropMethod,
|
|||||||
if ( this->CTest->GetCTestConfiguration("DropSiteUser").size() > 0 )
|
if ( this->CTest->GetCTestConfiguration("DropSiteUser").size() > 0 )
|
||||||
{
|
{
|
||||||
url += this->CTest->GetCTestConfiguration("DropSiteUser");
|
url += this->CTest->GetCTestConfiguration("DropSiteUser");
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->CTest->GetCTestConfiguration("DropSiteUser").c_str());
|
this->CTest->GetCTestConfiguration("DropSiteUser").c_str(),
|
||||||
|
this->Quiet);
|
||||||
if ( this->CTest->GetCTestConfiguration("DropSitePassword").size() > 0 )
|
if ( this->CTest->GetCTestConfiguration("DropSitePassword").size() > 0 )
|
||||||
{
|
{
|
||||||
url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
|
url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, ":******");
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, ":******",
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
url += "@";
|
url += "@";
|
||||||
}
|
}
|
||||||
@ -1147,8 +1155,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
|||||||
<< "datafilesmd5[0]=" << md5sum << "&"
|
<< "datafilesmd5[0]=" << md5sum << "&"
|
||||||
<< "type=" << curl.Escape(typeString);
|
<< "type=" << curl.Escape(typeString);
|
||||||
std::string fields = str.str();
|
std::string fields = str.str();
|
||||||
cmCTestLog(this->CTest, DEBUG, "fields: " << fields << "\nurl:"
|
cmCTestOptionalLog(this->CTest, DEBUG, "fields: " << fields << "\nurl:"
|
||||||
<< url << "\nfile: " << file << "\n");
|
<< url << "\nfile: " << file << "\n", this->Quiet);
|
||||||
std::string response;
|
std::string response;
|
||||||
if(!curl.HttpRequest(url, fields, response))
|
if(!curl.HttpRequest(url, fields, response))
|
||||||
{
|
{
|
||||||
@ -1156,8 +1164,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
|||||||
"Error in HttpRequest\n" << response);
|
"Error in HttpRequest\n" << response);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Request upload response: [" << response << "]\n");
|
"Request upload response: [" << response << "]\n", this->Quiet);
|
||||||
Json::Value json;
|
Json::Value json;
|
||||||
Json::Reader reader;
|
Json::Reader reader;
|
||||||
if(!reader.parse(response, json))
|
if(!reader.parse(response, json))
|
||||||
@ -1179,9 +1187,9 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
|||||||
int datares = json["datafilesmd5"][0].asInt();
|
int datares = json["datafilesmd5"][0].asInt();
|
||||||
if(datares == 1)
|
if(datares == 1)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"File already exists on CDash, skip upload "
|
"File already exists on CDash, skip upload " << file << "\n",
|
||||||
<< file << "\n");
|
this->Quiet);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1213,8 +1221,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
|||||||
<< reader.getFormattedErrorMessages() << "\n");
|
<< reader.getFormattedErrorMessages() << "\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Upload file response: [" << response << "]\n");
|
"Upload file response: [" << response << "]\n", this->Quiet );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1311,13 +1319,13 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
|
|
||||||
if (!this->HTTPProxy.empty())
|
if (!this->HTTPProxy.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Use HTTP Proxy: "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Use HTTP Proxy: "
|
||||||
<< this->HTTPProxy << std::endl);
|
<< this->HTTPProxy << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
if (!this->FTPProxy.empty())
|
if (!this->FTPProxy.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Use FTP Proxy: "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Use FTP Proxy: "
|
||||||
<< this->FTPProxy << std::endl);
|
<< this->FTPProxy << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
cmGeneratedFileStream ofs;
|
cmGeneratedFileStream ofs;
|
||||||
this->StartLogFile("Submit", ofs);
|
this->StartLogFile("Submit", ofs);
|
||||||
@ -1349,16 +1357,16 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
= buildDirectory + "/Testing/" + this->CTest->GetCurrentTag();
|
= buildDirectory + "/Testing/" + this->CTest->GetCurrentTag();
|
||||||
std::string::size_type glen = gpath.size() + 1;
|
std::string::size_type glen = gpath.size() + 1;
|
||||||
gpath = gpath + "/CoverageLog*";
|
gpath = gpath + "/CoverageLog*";
|
||||||
cmCTestLog(this->CTest, DEBUG, "Globbing for: " << gpath
|
cmCTestOptionalLog(this->CTest, DEBUG, "Globbing for: " << gpath
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
if ( cmSystemTools::SimpleGlob(gpath, gfiles, 1) )
|
if ( cmSystemTools::SimpleGlob(gpath, gfiles, 1) )
|
||||||
{
|
{
|
||||||
size_t cc;
|
size_t cc;
|
||||||
for ( cc = 0; cc < gfiles.size(); cc ++ )
|
for ( cc = 0; cc < gfiles.size(); cc ++ )
|
||||||
{
|
{
|
||||||
gfiles[cc] = gfiles[cc].substr(glen);
|
gfiles[cc] = gfiles[cc].substr(glen);
|
||||||
cmCTestLog(this->CTest, DEBUG, "Glob file: " << gfiles[cc]
|
cmCTestOptionalLog(this->CTest, DEBUG, "Glob file: " << gfiles[cc]
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
this->CTest->AddSubmitFile(cmCTest::PartCoverage, gfiles[cc].c_str());
|
this->CTest->AddSubmitFile(cmCTest::PartCoverage, gfiles[cc].c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1398,14 +1406,14 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
cnt ++;
|
cnt ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "Submit files (using "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Submit files (using "
|
||||||
<< this->CTest->GetCTestConfiguration("DropMethod") << ")"
|
<< this->CTest->GetCTestConfiguration("DropMethod") << ")"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
const char* specificTrack = this->CTest->GetSpecificTrack();
|
const char* specificTrack = this->CTest->GetSpecificTrack();
|
||||||
if ( specificTrack )
|
if ( specificTrack )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Send to track: "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Send to track: "
|
||||||
<< specificTrack << std::endl);
|
<< specificTrack << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
this->SetLogFile(&ofs);
|
this->SetLogFile(&ofs);
|
||||||
|
|
||||||
@ -1414,9 +1422,9 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
if ( dropMethod == "" || dropMethod == "ftp" )
|
if ( dropMethod == "" || dropMethod == "ftp" )
|
||||||
{
|
{
|
||||||
ofs << "Using drop method: FTP" << std::endl;
|
ofs << "Using drop method: FTP" << std::endl;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using FTP submit method"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< std::endl
|
" Using FTP submit method" << std::endl << " Drop site: ftp://",
|
||||||
<< " Drop site: ftp://");
|
this->Quiet);
|
||||||
std::string url = "ftp://";
|
std::string url = "ftp://";
|
||||||
url += cmCTest::MakeURLSafe(
|
url += cmCTest::MakeURLSafe(
|
||||||
this->CTest->GetCTestConfiguration("DropSiteUser")) + ":" +
|
this->CTest->GetCTestConfiguration("DropSiteUser")) + ":" +
|
||||||
@ -1427,18 +1435,20 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
this->CTest->GetCTestConfiguration("DropLocation"));
|
this->CTest->GetCTestConfiguration("DropLocation"));
|
||||||
if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty())
|
if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->CTest->GetCTestConfiguration(
|
this->CTest->GetCTestConfiguration(
|
||||||
"DropSiteUser").c_str());
|
"DropSiteUser").c_str(), this->Quiet);
|
||||||
if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty())
|
if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, ":******");
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, ":******",
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "@");
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "@", this->Quiet);
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->CTest->GetCTestConfiguration("DropSite")
|
this->CTest->GetCTestConfiguration("DropSite")
|
||||||
<< this->CTest->GetCTestConfiguration("DropLocation") << std::endl);
|
<< this->CTest->GetCTestConfiguration("DropLocation") << std::endl,
|
||||||
|
this->Quiet);
|
||||||
if ( !this->SubmitUsingFTP(buildDirectory + "/Testing/"
|
if ( !this->SubmitUsingFTP(buildDirectory + "/Testing/"
|
||||||
+ this->CTest->GetCurrentTag(),
|
+ this->CTest->GetCurrentTag(),
|
||||||
files, prefix, url) )
|
files, prefix, url) )
|
||||||
@ -1451,11 +1461,12 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
}
|
}
|
||||||
if(!this->CDash)
|
if(!this->CDash)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
" Using HTTP trigger method"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " Trigger site: "
|
<< " Trigger site: "
|
||||||
<< this->CTest->GetCTestConfiguration("TriggerSite")
|
<< this->CTest->GetCTestConfiguration("TriggerSite")
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
if ( !this->
|
if ( !this->
|
||||||
TriggerUsingHTTP(files, prefix,
|
TriggerUsingHTTP(files, prefix,
|
||||||
this->CTest->GetCTestConfiguration("TriggerSite")))
|
this->CTest->GetCTestConfiguration("TriggerSite")))
|
||||||
@ -1465,8 +1476,8 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
ofs << " Problems when triggering via HTTP" << std::endl;
|
ofs << " Problems when triggering via HTTP" << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< std::endl);
|
" Submission successful" << std::endl, this->Quiet);
|
||||||
ofs << " Submission successful" << std::endl;
|
ofs << " Submission successful" << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1476,27 +1487,30 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
std::string url = dropMethod;
|
std::string url = dropMethod;
|
||||||
url += "://";
|
url += "://";
|
||||||
ofs << "Using drop method: " << dropMethod << std::endl;
|
ofs << "Using drop method: " << dropMethod << std::endl;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using HTTP submit method"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< std::endl
|
" Using HTTP submit method" << std::endl << " Drop site:" << url,
|
||||||
<< " Drop site:" << url);
|
this->Quiet);
|
||||||
if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty())
|
if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty())
|
||||||
{
|
{
|
||||||
url += this->CTest->GetCTestConfiguration("DropSiteUser");
|
url += this->CTest->GetCTestConfiguration("DropSiteUser");
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->CTest->GetCTestConfiguration("DropSiteUser").c_str());
|
this->CTest->GetCTestConfiguration("DropSiteUser").c_str(),
|
||||||
|
this->Quiet);
|
||||||
if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty())
|
if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty())
|
||||||
{
|
{
|
||||||
url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
|
url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, ":******");
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, ":******",
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
url += "@";
|
url += "@";
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "@");
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "@", this->Quiet);
|
||||||
}
|
}
|
||||||
url += this->CTest->GetCTestConfiguration("DropSite") +
|
url += this->CTest->GetCTestConfiguration("DropSite") +
|
||||||
this->CTest->GetCTestConfiguration("DropLocation");
|
this->CTest->GetCTestConfiguration("DropLocation");
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->CTest->GetCTestConfiguration("DropSite")
|
this->CTest->GetCTestConfiguration("DropSite")
|
||||||
<< this->CTest->GetCTestConfiguration("DropLocation") << std::endl);
|
<< this->CTest->GetCTestConfiguration("DropLocation") << std::endl,
|
||||||
|
this->Quiet);
|
||||||
if ( !this->SubmitUsingHTTP(buildDirectory + "/Testing/" +
|
if ( !this->SubmitUsingHTTP(buildDirectory + "/Testing/" +
|
||||||
this->CTest->GetCurrentTag(), files, prefix, url) )
|
this->CTest->GetCurrentTag(), files, prefix, url) )
|
||||||
{
|
{
|
||||||
@ -1507,11 +1521,10 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
}
|
}
|
||||||
if(!this->CDash)
|
if(!this->CDash)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< std::endl
|
" Using HTTP trigger method" << std::endl << " Trigger site: "
|
||||||
<< " Trigger site: "
|
|
||||||
<< this->CTest->GetCTestConfiguration("TriggerSite")
|
<< this->CTest->GetCTestConfiguration("TriggerSite")
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
if ( !this->
|
if ( !this->
|
||||||
TriggerUsingHTTP(files, prefix,
|
TriggerUsingHTTP(files, prefix,
|
||||||
this->CTest->GetCTestConfiguration("TriggerSite")))
|
this->CTest->GetCTestConfiguration("TriggerSite")))
|
||||||
@ -1530,8 +1543,10 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful" <<
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
(this->HasWarnings ? ", with warnings." : "") << std::endl);
|
" Submission successful" <<
|
||||||
|
(this->HasWarnings ? ", with warnings." : "") << std::endl,
|
||||||
|
this->Quiet);
|
||||||
ofs << " Submission successful" <<
|
ofs << " Submission successful" <<
|
||||||
(this->HasWarnings ? ", with warnings." : "") << std::endl;
|
(this->HasWarnings ? ", with warnings." : "") << std::endl;
|
||||||
}
|
}
|
||||||
@ -1542,8 +1557,8 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
{
|
{
|
||||||
#if defined(CTEST_USE_XMLRPC)
|
#if defined(CTEST_USE_XMLRPC)
|
||||||
ofs << "Using drop method: XML-RPC" << std::endl;
|
ofs << "Using drop method: XML-RPC" << std::endl;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using XML-RPC submit method"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< std::endl);
|
" Using XML-RPC submit method" << std::endl, this->Quiet);
|
||||||
std::string url = this->CTest->GetCTestConfiguration("DropSite");
|
std::string url = this->CTest->GetCTestConfiguration("DropSite");
|
||||||
prefix = this->CTest->GetCTestConfiguration("DropLocation");
|
prefix = this->CTest->GetCTestConfiguration("DropLocation");
|
||||||
if ( !this->SubmitUsingXMLRPC(buildDirectory + "/Testing/" +
|
if ( !this->SubmitUsingXMLRPC(buildDirectory + "/Testing/" +
|
||||||
@ -1554,8 +1569,8 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
ofs << " Problems when submitting via XML-RPC" << std::endl;
|
ofs << " Problems when submitting via XML-RPC" << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Submission successful"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
ofs << " Submission successful" << std::endl;
|
ofs << " Submission successful" << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
@ -1593,8 +1608,8 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
cmSystemTools::ChangeDirectory(oldWorkingDirectory);
|
cmSystemTools::ChangeDirectory(oldWorkingDirectory);
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Submission successful"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
ofs << " Submission successful" << std::endl;
|
ofs << " Submission successful" << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1609,8 +1624,8 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
std::string
|
std::string
|
||||||
oldWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory();
|
oldWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory();
|
||||||
cmSystemTools::ChangeDirectory(buildDirectory);
|
cmSystemTools::ChangeDirectory(buildDirectory);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Change directory: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< buildDirectory << std::endl);
|
" Change directory: " << buildDirectory << std::endl, this->Quiet);
|
||||||
|
|
||||||
if ( !this->SubmitUsingCP(
|
if ( !this->SubmitUsingCP(
|
||||||
"Testing/"+this->CTest->GetCurrentTag(),
|
"Testing/"+this->CTest->GetCurrentTag(),
|
||||||
@ -1626,8 +1641,8 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
cmSystemTools::ChangeDirectory(oldWorkingDirectory);
|
cmSystemTools::ChangeDirectory(oldWorkingDirectory);
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Submission successful"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
ofs << " Submission successful" << std::endl;
|
ofs << " Submission successful" << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -103,6 +103,7 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
|
|||||||
{
|
{
|
||||||
this->CTest->SetStopTime(this->Values[ctt_STOP_TIME]);
|
this->CTest->SetStopTime(this->Values[ctt_STOP_TIME]);
|
||||||
}
|
}
|
||||||
|
handler->SetQuiet(this->Quiet);
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -527,10 +527,10 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
|
|
||||||
this->TestResults.clear();
|
this->TestResults.clear();
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
(this->MemCheck ? "Memory check" : "Test")
|
(this->MemCheck ? "Memory check" : "Test")
|
||||||
<< " project " << cmSystemTools::GetCurrentWorkingDirectory()
|
<< " project " << cmSystemTools::GetCurrentWorkingDirectory()
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
if ( ! this->PreProcessHandler() )
|
if ( ! this->PreProcessHandler() )
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
@ -567,13 +567,13 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
if (this->HandlerVerbose && !passed.empty() &&
|
if (this->HandlerVerbose && !passed.empty() &&
|
||||||
(this->UseIncludeRegExpFlag || this->UseExcludeRegExpFlag))
|
(this->UseIncludeRegExpFlag || this->UseExcludeRegExpFlag))
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl
|
||||||
<< "The following tests passed:" << std::endl);
|
<< "The following tests passed:" << std::endl, this->Quiet);
|
||||||
for(std::vector<std::string>::iterator j = passed.begin();
|
for(std::vector<std::string>::iterator j = passed.begin();
|
||||||
j != passed.end(); ++j)
|
j != passed.end(); ++j)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "\t" << *j
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "\t" << *j
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -593,8 +593,8 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
}
|
}
|
||||||
char realBuf[1024];
|
char realBuf[1024];
|
||||||
sprintf(realBuf, "%6.2f sec", (double)(clock_finish - clock_start));
|
sprintf(realBuf, "%6.2f sec", (double)(clock_finish - clock_start));
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\nTotal Test time (real) = "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< realBuf << "\n" );
|
"\nTotal Test time (real) = " << realBuf << "\n", this->Quiet );
|
||||||
|
|
||||||
if (!failed.empty())
|
if (!failed.empty())
|
||||||
{
|
{
|
||||||
@ -614,11 +614,11 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
if ( ftit->Status != cmCTestTestHandler::COMPLETED )
|
if ( ftit->Status != cmCTestTestHandler::COMPLETED )
|
||||||
{
|
{
|
||||||
ofs << ftit->TestCount << ":" << ftit->Name << std::endl;
|
ofs << ftit->TestCount << ":" << ftit->Name << std::endl;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t" << std::setw(3)
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\t" << std::setw(3)
|
||||||
<< ftit->TestCount << " - "
|
<< ftit->TestCount << " - "
|
||||||
<< ftit->Name << " ("
|
<< ftit->Name << " ("
|
||||||
<< this->GetTestStatus(ftit->Status) << ")"
|
<< this->GetTestStatus(ftit->Status) << ")"
|
||||||
<< std::endl);
|
<< std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -700,7 +700,8 @@ void cmCTestTestHandler::PrintLabelSummary()
|
|||||||
// now print times
|
// now print times
|
||||||
if(!labels.empty())
|
if(!labels.empty())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\nLabel Time Summary:");
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\nLabel Time Summary:",
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
for(std::set<std::string>::const_iterator i = labels.begin();
|
for(std::set<std::string>::const_iterator i = labels.begin();
|
||||||
i != labels.end(); ++i)
|
i != labels.end(); ++i)
|
||||||
@ -709,8 +710,8 @@ void cmCTestTestHandler::PrintLabelSummary()
|
|||||||
label.resize(maxlen +3, ' ');
|
label.resize(maxlen +3, ' ');
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
sprintf(buf, "%6.2f sec", labelTimes[*i]);
|
sprintf(buf, "%6.2f sec", labelTimes[*i]);
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\n"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n"
|
||||||
<< label << " = " << buf );
|
<< label << " = " << buf, this->Quiet );
|
||||||
if ( this->LogFile )
|
if ( this->LogFile )
|
||||||
{
|
{
|
||||||
*this->LogFile << "\n" << *i << " = "
|
*this->LogFile << "\n" << *i << " = "
|
||||||
@ -723,7 +724,7 @@ void cmCTestTestHandler::PrintLabelSummary()
|
|||||||
{
|
{
|
||||||
*this->LogFile << "\n";
|
*this->LogFile << "\n";
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\n");
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n", this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1063,6 +1064,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<std::string> &passed,
|
|||||||
parallel->SetCTest(this->CTest);
|
parallel->SetCTest(this->CTest);
|
||||||
parallel->SetParallelLevel(this->CTest->GetParallelLevel());
|
parallel->SetParallelLevel(this->CTest->GetParallelLevel());
|
||||||
parallel->SetTestHandler(this);
|
parallel->SetTestHandler(this);
|
||||||
|
parallel->SetQuiet(this->Quiet);
|
||||||
|
|
||||||
*this->LogFile << "Start testing: "
|
*this->LogFile << "Start testing: "
|
||||||
<< this->CTest->CurrentTime() << std::endl
|
<< this->CTest->CurrentTime() << std::endl
|
||||||
@ -1334,8 +1336,8 @@ int cmCTestTestHandler::ExecuteCommands(std::vector<std::string>& vec)
|
|||||||
for ( it = vec.begin(); it != vec.end(); ++it )
|
for ( it = vec.begin(); it != vec.end(); ++it )
|
||||||
{
|
{
|
||||||
int retVal = 0;
|
int retVal = 0;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << *it
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " <<
|
||||||
<< std::endl);
|
*it << std::endl, this->Quiet);
|
||||||
if ( !cmSystemTools::RunSingleCommand(it->c_str(), 0, &retVal, 0,
|
if ( !cmSystemTools::RunSingleCommand(it->c_str(), 0, &retVal, 0,
|
||||||
cmSystemTools::OUTPUT_MERGE
|
cmSystemTools::OUTPUT_MERGE
|
||||||
/*this->Verbose*/) || retVal != 0 )
|
/*this->Verbose*/) || retVal != 0 )
|
||||||
@ -1541,8 +1543,7 @@ std::string cmCTestTestHandler
|
|||||||
for(std::vector<std::string>::iterator i = failed.begin();
|
for(std::vector<std::string>::iterator i = failed.begin();
|
||||||
i != failed.end(); ++i)
|
i != failed.end(); ++i)
|
||||||
{
|
{
|
||||||
cmCTestLog(ctest, HANDLER_OUTPUT,
|
cmCTestLog(ctest, HANDLER_OUTPUT, i->c_str() << "\n");
|
||||||
i->c_str() << "\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1571,8 +1572,8 @@ void cmCTestTestHandler::GetListOfTests()
|
|||||||
{
|
{
|
||||||
this->ExcludeTestsRegularExpression.compile(this->ExcludeRegExp.c_str());
|
this->ExcludeTestsRegularExpression.compile(this->ExcludeRegExp.c_str());
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Constructing a list of tests" << std::endl);
|
"Constructing a list of tests" << std::endl, this->Quiet);
|
||||||
cmake cm;
|
cmake cm;
|
||||||
cmGlobalGenerator gg;
|
cmGlobalGenerator gg;
|
||||||
gg.SetCMakeInstance(&cm);
|
gg.SetCMakeInstance(&cm);
|
||||||
@ -1628,8 +1629,8 @@ void cmCTestTestHandler::GetListOfTests()
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Done constructing a list of tests" << std::endl);
|
"Done constructing a list of tests" << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@ -2016,8 +2017,8 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
|
|||||||
<< "><Value>File " << filename
|
<< "><Value>File " << filename
|
||||||
<< " not found</Value></NamedMeasurement>"
|
<< " not found</Value></NamedMeasurement>"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "File \"" << filename
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "File \"" << filename
|
||||||
<< "\" not found." << std::endl);
|
<< "\" not found." << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
cxml.erase(measurementfile.start(),
|
cxml.erase(measurementfile.start(),
|
||||||
measurementfile.end() - measurementfile.start());
|
measurementfile.end() - measurementfile.start());
|
||||||
@ -2265,7 +2266,8 @@ bool cmCTestTestHandler::SetTestsProperties(
|
|||||||
bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args)
|
bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args)
|
||||||
{
|
{
|
||||||
const std::string& testname = args[0];
|
const std::string& testname = args[0];
|
||||||
cmCTestLog(this->CTest, DEBUG, "Add test: " << args[0] << std::endl);
|
cmCTestOptionalLog(this->CTest, DEBUG, "Add test: " << args[0] << std::endl,
|
||||||
|
this->Quiet);
|
||||||
|
|
||||||
if (this->UseExcludeRegExpFlag &&
|
if (this->UseExcludeRegExpFlag &&
|
||||||
this->UseExcludeRegExpFirst &&
|
this->UseExcludeRegExpFirst &&
|
||||||
@ -2288,8 +2290,8 @@ bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args)
|
|||||||
}
|
}
|
||||||
if ( found )
|
if ( found )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Ignore memcheck: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< *it << std::endl);
|
"Ignore memcheck: " << *it << std::endl, this->Quiet);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2308,8 +2310,8 @@ bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args)
|
|||||||
}
|
}
|
||||||
if ( found )
|
if ( found )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Ignore test: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Ignore test: "
|
||||||
<< *it << std::endl);
|
<< *it << std::endl, this->Quiet);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2318,8 +2320,8 @@ bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args)
|
|||||||
test.Name = testname;
|
test.Name = testname;
|
||||||
test.Args = args;
|
test.Args = args;
|
||||||
test.Directory = cmSystemTools::GetCurrentWorkingDirectory();
|
test.Directory = cmSystemTools::GetCurrentWorkingDirectory();
|
||||||
cmCTestLog(this->CTest, DEBUG, "Set test directory: "
|
cmCTestOptionalLog(this->CTest, DEBUG, "Set test directory: "
|
||||||
<< test.Directory << std::endl);
|
<< test.Directory << std::endl, this->Quiet);
|
||||||
|
|
||||||
test.IsInBasedOnREOptions = true;
|
test.IsInBasedOnREOptions = true;
|
||||||
test.WillFail = false;
|
test.WillFail = false;
|
||||||
|
@ -20,55 +20,56 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler()
|
|||||||
{
|
{
|
||||||
this->CTest->SetCTestConfiguration("SourceDirectory",
|
this->CTest->SetCTestConfiguration("SourceDirectory",
|
||||||
cmSystemTools::CollapseFullPath(
|
cmSystemTools::CollapseFullPath(
|
||||||
this->Values[ct_SOURCE]).c_str());
|
this->Values[ct_SOURCE]).c_str(), this->Quiet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->CTest->SetCTestConfiguration("SourceDirectory",
|
this->CTest->SetCTestConfiguration("SourceDirectory",
|
||||||
cmSystemTools::CollapseFullPath(
|
cmSystemTools::CollapseFullPath(
|
||||||
this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")).c_str());
|
this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")).c_str(),
|
||||||
|
this->Quiet);
|
||||||
}
|
}
|
||||||
std::string source_dir
|
std::string source_dir
|
||||||
= this->CTest->GetCTestConfiguration("SourceDirectory");
|
= this->CTest->GetCTestConfiguration("SourceDirectory");
|
||||||
|
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"UpdateCommand", "CTEST_UPDATE_COMMAND");
|
"UpdateCommand", "CTEST_UPDATE_COMMAND", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"UpdateOptions", "CTEST_UPDATE_OPTIONS");
|
"UpdateOptions", "CTEST_UPDATE_OPTIONS", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"CVSCommand", "CTEST_CVS_COMMAND");
|
"CVSCommand", "CTEST_CVS_COMMAND", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"CVSUpdateOptions", "CTEST_CVS_UPDATE_OPTIONS");
|
"CVSUpdateOptions", "CTEST_CVS_UPDATE_OPTIONS", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"SVNCommand", "CTEST_SVN_COMMAND");
|
"SVNCommand", "CTEST_SVN_COMMAND", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"SVNUpdateOptions", "CTEST_SVN_UPDATE_OPTIONS");
|
"SVNUpdateOptions", "CTEST_SVN_UPDATE_OPTIONS", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"SVNOptions", "CTEST_SVN_OPTIONS");
|
"SVNOptions", "CTEST_SVN_OPTIONS", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"BZRCommand", "CTEST_BZR_COMMAND");
|
"BZRCommand", "CTEST_BZR_COMMAND", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"BZRUpdateOptions", "CTEST_BZR_UPDATE_OPTIONS");
|
"BZRUpdateOptions", "CTEST_BZR_UPDATE_OPTIONS", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"GITCommand", "CTEST_GIT_COMMAND");
|
"GITCommand", "CTEST_GIT_COMMAND", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"GITUpdateOptions", "CTEST_GIT_UPDATE_OPTIONS");
|
"GITUpdateOptions", "CTEST_GIT_UPDATE_OPTIONS", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"GITUpdateCustom", "CTEST_GIT_UPDATE_CUSTOM");
|
"GITUpdateCustom", "CTEST_GIT_UPDATE_CUSTOM", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"UpdateVersionOnly", "CTEST_UPDATE_VERSION_ONLY");
|
"UpdateVersionOnly", "CTEST_UPDATE_VERSION_ONLY", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"HGCommand", "CTEST_HG_COMMAND");
|
"HGCommand", "CTEST_HG_COMMAND", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"HGUpdateOptions", "CTEST_HG_UPDATE_OPTIONS");
|
"HGUpdateOptions", "CTEST_HG_UPDATE_OPTIONS", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"P4Command", "CTEST_P4_COMMAND");
|
"P4Command", "CTEST_P4_COMMAND", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"P4UpdateOptions", "CTEST_P4_UPDATE_OPTIONS");
|
"P4UpdateOptions", "CTEST_P4_UPDATE_OPTIONS", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"P4Client", "CTEST_P4_CLIENT");
|
"P4Client", "CTEST_P4_CLIENT", this->Quiet);
|
||||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||||
"P4Options", "CTEST_P4_OPTIONS");
|
"P4Options", "CTEST_P4_OPTIONS", this->Quiet);
|
||||||
|
|
||||||
cmCTestGenericHandler* handler
|
cmCTestGenericHandler* handler
|
||||||
= this->CTest->GetInitializedHandler("update");
|
= this->CTest->GetInitializedHandler("update");
|
||||||
@ -84,6 +85,7 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
handler->SetOption("SourceDirectory", source_dir.c_str());
|
handler->SetOption("SourceDirectory", source_dir.c_str());
|
||||||
|
handler->SetQuiet(this->Quiet);
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,11 +122,13 @@ void cmCTestUpdateHandler::Initialize()
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int cmCTestUpdateHandler::DetermineType(const char* cmd, const char* type)
|
int cmCTestUpdateHandler::DetermineType(const char* cmd, const char* type)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "Determine update type from command: " << cmd
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
<< " and type: " << type << std::endl);
|
"Determine update type from command: " << cmd << " and type: " << type <<
|
||||||
|
std::endl, this->Quiet);
|
||||||
if ( type && *type )
|
if ( type && *type )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "Type specified: " << type << std::endl);
|
cmCTestOptionalLog(this->CTest, DEBUG, "Type specified: " << type <<
|
||||||
|
std::endl, this->Quiet);
|
||||||
std::string stype = cmSystemTools::LowerCase(type);
|
std::string stype = cmSystemTools::LowerCase(type);
|
||||||
if ( stype.find("cvs") != std::string::npos )
|
if ( stype.find("cvs") != std::string::npos )
|
||||||
{
|
{
|
||||||
@ -155,8 +157,8 @@ int cmCTestUpdateHandler::DetermineType(const char* cmd, const char* type)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "Type not specified, check command: "
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
<< cmd << std::endl);
|
"Type not specified, check command: " << cmd << std::endl, this->Quiet);
|
||||||
std::string stype = cmSystemTools::LowerCase(cmd);
|
std::string stype = cmSystemTools::LowerCase(cmd);
|
||||||
if ( stype.find("cvs") != std::string::npos )
|
if ( stype.find("cvs") != std::string::npos )
|
||||||
{
|
{
|
||||||
@ -211,18 +213,19 @@ int cmCTestUpdateHandler::ProcessHandler()
|
|||||||
this->StartLogFile("Update", ofs);
|
this->StartLogFile("Update", ofs);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Updating the repository: "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< sourceDirectory << std::endl);
|
" Updating the repository: " << sourceDirectory << std::endl,
|
||||||
|
this->Quiet);
|
||||||
|
|
||||||
if(!this->SelectVCS())
|
if(!this->SelectVCS())
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Use "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Use "
|
||||||
<< cmCTestUpdateHandlerUpdateToString(this->UpdateType)
|
<< cmCTestUpdateHandlerUpdateToString(this->UpdateType)
|
||||||
<< " repository type"
|
<< " repository type"
|
||||||
<< std::endl;);
|
<< std::endl;, this->Quiet);
|
||||||
|
|
||||||
// Create an object to interact with the VCS tool.
|
// Create an object to interact with the VCS tool.
|
||||||
cmsys::auto_ptr<cmCTestVC> vc;
|
cmsys::auto_ptr<cmCTestVC> vc;
|
||||||
@ -283,23 +286,23 @@ int cmCTestUpdateHandler::ProcessHandler()
|
|||||||
int numUpdated = vc->GetPathCount(cmCTestVC::PathUpdated);
|
int numUpdated = vc->GetPathCount(cmCTestVC::PathUpdated);
|
||||||
if(numUpdated)
|
if(numUpdated)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
" Found " << numUpdated << " updated files\n");
|
" Found " << numUpdated << " updated files\n", this->Quiet);
|
||||||
}
|
}
|
||||||
if(int numModified = vc->GetPathCount(cmCTestVC::PathModified))
|
if(int numModified = vc->GetPathCount(cmCTestVC::PathModified))
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
" Found " << numModified << " locally modified files\n");
|
" Found " << numModified << " locally modified files\n", this->Quiet);
|
||||||
localModifications += numModified;
|
localModifications += numModified;
|
||||||
}
|
}
|
||||||
if(int numConflicting = vc->GetPathCount(cmCTestVC::PathConflicting))
|
if(int numConflicting = vc->GetPathCount(cmCTestVC::PathConflicting))
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
" Found " << numConflicting << " conflicting files\n");
|
" Found " << numConflicting << " conflicting files\n", this->Quiet);
|
||||||
localModifications += numConflicting;
|
localModifications += numConflicting;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, DEBUG, "End" << std::endl);
|
cmCTestOptionalLog(this->CTest, DEBUG, "End" << std::endl, this->Quiet);
|
||||||
std::string end_time = this->CTest->CurrentTime();
|
std::string end_time = this->CTest->CurrentTime();
|
||||||
os << "\t<EndDateTime>" << end_time << "</EndDateTime>\n"
|
os << "\t<EndDateTime>" << end_time << "</EndDateTime>\n"
|
||||||
<< "\t<EndTime>" << static_cast<unsigned int>(cmSystemTools::GetTime())
|
<< "\t<EndTime>" << static_cast<unsigned int>(cmSystemTools::GetTime())
|
||||||
@ -331,8 +334,8 @@ int cmCTestUpdateHandler::ProcessHandler()
|
|||||||
int cmCTestUpdateHandler::DetectVCS(const char* dir)
|
int cmCTestUpdateHandler::DetectVCS(const char* dir)
|
||||||
{
|
{
|
||||||
std::string sourceDirectory = dir;
|
std::string sourceDirectory = dir;
|
||||||
cmCTestLog(this->CTest, DEBUG, "Check directory: "
|
cmCTestOptionalLog(this->CTest, DEBUG, "Check directory: "
|
||||||
<< sourceDirectory << std::endl);
|
<< sourceDirectory << std::endl, this->Quiet);
|
||||||
sourceDirectory += "/.svn";
|
sourceDirectory += "/.svn";
|
||||||
if ( cmSystemTools::FileExists(sourceDirectory.c_str()) )
|
if ( cmSystemTools::FileExists(sourceDirectory.c_str()) )
|
||||||
{
|
{
|
||||||
|
@ -26,6 +26,7 @@ cmCTestGenericHandler* cmCTestUploadCommand::InitializeHandler()
|
|||||||
}
|
}
|
||||||
static_cast<cmCTestUploadHandler*>(handler)->SetFiles(this->Files);
|
static_cast<cmCTestUploadHandler*>(handler)->SetFiles(this->Files);
|
||||||
|
|
||||||
|
handler->SetQuiet(this->Quiet);
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,6 +39,12 @@ bool cmCTestUploadCommand::CheckArgumentKeyword(std::string const& arg)
|
|||||||
this->ArgumentDoing = ArgumentDoingFiles;
|
this->ArgumentDoing = ArgumentDoingFiles;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if(arg == "QUIET")
|
||||||
|
{
|
||||||
|
this->ArgumentDoing = ArgumentDoingNone;
|
||||||
|
this->Quiet = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,8 +64,8 @@ int cmCTestUploadHandler::ProcessHandler()
|
|||||||
|
|
||||||
for ( it = this->Files.begin(); it != this->Files.end(); it ++ )
|
for ( it = this->Files.begin(); it != this->Files.end(); it ++ )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, OUTPUT,
|
cmCTestOptionalLog(this->CTest, OUTPUT,
|
||||||
"\tUpload file: " << *it << std::endl);
|
"\tUpload file: " << *it << std::endl, this->Quiet);
|
||||||
ofs << "<File filename=\"" << cmXMLSafe(*it) << "\">\n"
|
ofs << "<File filename=\"" << cmXMLSafe(*it) << "\">\n"
|
||||||
<< "<Content encoding=\"base64\">\n";
|
<< "<Content encoding=\"base64\">\n";
|
||||||
ofs << this->CTest->Base64EncodeFile(*it);
|
ofs << this->CTest->Base64EncodeFile(*it);
|
||||||
|
@ -138,12 +138,12 @@ bool cmParseBlanketJSCoverage::LoadCoverageData(std::vector<std::string> files)
|
|||||||
{
|
{
|
||||||
size_t i=0;
|
size_t i=0;
|
||||||
std::string path;
|
std::string path;
|
||||||
cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
||||||
"Found " << files.size() <<" Files" << std::endl);
|
"Found " << files.size() <<" Files" << std::endl, this->Coverage.Quiet);
|
||||||
for(i=0;i<files.size();i++)
|
for(i=0;i<files.size();i++)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
||||||
"Reading JSON File " << files[i] << std::endl);
|
"Reading JSON File " << files[i] << std::endl, this->Coverage.Quiet);
|
||||||
|
|
||||||
if(!this->ReadJSONFile(files[i]))
|
if(!this->ReadJSONFile(files[i]))
|
||||||
{
|
{
|
||||||
@ -157,8 +157,8 @@ bool cmParseBlanketJSCoverage::ReadJSONFile(std::string file)
|
|||||||
{
|
{
|
||||||
cmParseBlanketJSCoverage::JSONParser parser
|
cmParseBlanketJSCoverage::JSONParser parser
|
||||||
(this->Coverage);
|
(this->Coverage);
|
||||||
cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
||||||
"Parsing " << file << std::endl);
|
"Parsing " << file << std::endl, this->Coverage.Quiet);
|
||||||
parser.ParseFile(file);
|
parser.ParseFile(file);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -71,9 +71,9 @@ void cmParseCacheCoverage::RemoveUnCoveredFiles()
|
|||||||
}
|
}
|
||||||
if(nothing)
|
if(nothing)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"No coverage found in: " << ci->first
|
"No coverage found in: " << ci->first
|
||||||
<< std::endl);
|
<< std::endl, this->Coverage.Quiet);
|
||||||
this->Coverage.TotalCoverage.erase(ci++);
|
this->Coverage.TotalCoverage.erase(ci++);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -50,8 +50,8 @@ protected:
|
|||||||
if (this->InSources && this->InSource)
|
if (this->InSources && this->InSource)
|
||||||
{
|
{
|
||||||
this->FilePaths.push_back(tmp);
|
this->FilePaths.push_back(tmp);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Adding Source: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< tmp << std::endl);
|
"Adding Source: " << tmp << std::endl, this->Coverage.Quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,8 +74,9 @@ protected:
|
|||||||
{
|
{
|
||||||
if(strcmp(atts[tagCount], "filename") == 0)
|
if(strcmp(atts[tagCount], "filename") == 0)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Reading file: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< atts[tagCount+1]<< std::endl);
|
"Reading file: " << atts[tagCount+1]<< std::endl,
|
||||||
|
this->Coverage.Quiet);
|
||||||
std::string filename = atts[tagCount+1];
|
std::string filename = atts[tagCount+1];
|
||||||
this->CurFileName = "";
|
this->CurFileName = "";
|
||||||
|
|
||||||
@ -113,9 +114,9 @@ protected:
|
|||||||
fin.open(this->CurFileName.c_str());
|
fin.open(this->CurFileName.c_str());
|
||||||
if (!fin)
|
if (!fin)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Skipping system file " << filename <<
|
"Skipping system file " << filename << std::endl,
|
||||||
std::endl);
|
this->Coverage.Quiet);
|
||||||
|
|
||||||
this->SkipThisClass = true;
|
this->SkipThisClass = true;
|
||||||
break;
|
break;
|
||||||
|
@ -122,8 +122,9 @@ public:
|
|||||||
lastoffset = line.find('(',pos);
|
lastoffset = line.find('(',pos);
|
||||||
if(lastoffset==line.npos)
|
if(lastoffset==line.npos)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
||||||
endnamepos << "File not found " << lastoffset << std::endl);
|
endnamepos << "File not found " << lastoffset << std::endl,
|
||||||
|
this->Coverage.Quiet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
endnamepos = line.find(')',lastoffset);
|
endnamepos = line.find(')',lastoffset);
|
||||||
@ -131,8 +132,9 @@ public:
|
|||||||
(endnamepos-1)-lastoffset);
|
(endnamepos-1)-lastoffset);
|
||||||
if(filename.find(".pas") != filename.npos)
|
if(filename.find(".pas") != filename.npos)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
||||||
"Coverage found for file: " << filename << std::endl);
|
"Coverage found for file: " << filename << std::endl,
|
||||||
|
this->Coverage.Quiet);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pos = lastoffset+1;
|
pos = lastoffset+1;
|
||||||
@ -153,8 +155,9 @@ public:
|
|||||||
* If that doesn't find any matching files
|
* If that doesn't find any matching files
|
||||||
* return a failure.
|
* return a failure.
|
||||||
*/
|
*/
|
||||||
cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
||||||
"Unable to find file matching" << glob << std::endl);
|
"Unable to find file matching" << glob << std::endl,
|
||||||
|
this->Coverage.Quiet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
FileLinesType& coverageVector =
|
FileLinesType& coverageVector =
|
||||||
@ -229,8 +232,8 @@ bool cmParseDelphiCoverage::LoadCoverageData(
|
|||||||
{
|
{
|
||||||
path = files[i];
|
path = files[i];
|
||||||
|
|
||||||
cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
||||||
"Reading HTML File " << path << std::endl);
|
"Reading HTML File " << path << std::endl, this->Coverage.Quiet);
|
||||||
if(cmSystemTools::GetFilenameLastExtension(path) == ".html")
|
if(cmSystemTools::GetFilenameLastExtension(path) == ".html")
|
||||||
{
|
{
|
||||||
if(!this->ReadDelphiHTML(path.c_str()))
|
if(!this->ReadDelphiHTML(path.c_str()))
|
||||||
|
@ -49,8 +49,9 @@ class cmParseJacocoCoverage::XMLParser: public cmXMLParser
|
|||||||
else if(name == "sourcefile")
|
else if(name == "sourcefile")
|
||||||
{
|
{
|
||||||
this->FileName = atts[1];
|
this->FileName = atts[1];
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Reading file: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< this->FileName << std::endl);
|
"Reading file: " << this->FileName << std::endl,
|
||||||
|
this->Coverage.Quiet);
|
||||||
for(size_t i=0;i < FilePaths.size();i++)
|
for(size_t i=0;i < FilePaths.size();i++)
|
||||||
{
|
{
|
||||||
std::string finalpath = FilePaths[i] + "/" + this->FileName;
|
std::string finalpath = FilePaths[i] + "/" + this->FileName;
|
||||||
@ -148,8 +149,8 @@ bool cmParseJacocoCoverage::LoadCoverageData(
|
|||||||
{
|
{
|
||||||
path = files[i];
|
path = files[i];
|
||||||
|
|
||||||
cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
|
||||||
"Reading XML File " << path << std::endl);
|
"Reading XML File " << path << std::endl, this->Coverage.Quiet);
|
||||||
if(cmSystemTools::GetFilenameLastExtension(path) == ".xml")
|
if(cmSystemTools::GetFilenameLastExtension(path) == ".xml")
|
||||||
{
|
{
|
||||||
if(!this->ReadJacocoXML(path.c_str()))
|
if(!this->ReadJacocoXML(path.c_str()))
|
||||||
|
@ -463,7 +463,13 @@ cmCTest::Part cmCTest::GetPartFromName(const char* name)
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
bool quiet = false;
|
||||||
|
if (command && command->ShouldBeQuiet())
|
||||||
|
{
|
||||||
|
quiet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl, quiet);
|
||||||
if(!this->InteractiveDebugMode)
|
if(!this->InteractiveDebugMode)
|
||||||
{
|
{
|
||||||
this->BlockTestErrorDiagnostics();
|
this->BlockTestErrorDiagnostics();
|
||||||
@ -478,24 +484,23 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
|||||||
|
|
||||||
this->UpdateCTestConfiguration();
|
this->UpdateCTestConfiguration();
|
||||||
|
|
||||||
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl, quiet);
|
||||||
if ( this->ProduceXML )
|
if ( this->ProduceXML )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl, quiet);
|
||||||
cmCTestLog(this, OUTPUT,
|
cmCTestOptionalLog(this, OUTPUT,
|
||||||
" Site: " << this->GetCTestConfiguration("Site") << std::endl
|
" Site: " << this->GetCTestConfiguration("Site") << std::endl <<
|
||||||
<< " Build name: "
|
" Build name: " << cmCTest::SafeBuildIdField(
|
||||||
<< cmCTest::SafeBuildIdField(
|
this->GetCTestConfiguration("BuildName")) << std::endl, quiet);
|
||||||
this->GetCTestConfiguration("BuildName"))
|
cmCTestOptionalLog(this, DEBUG, "Produce XML is on" << std::endl, quiet);
|
||||||
<< std::endl);
|
|
||||||
cmCTestLog(this, DEBUG, "Produce XML is on" << std::endl);
|
|
||||||
if ( this->TestModel == cmCTest::NIGHTLY &&
|
if ( this->TestModel == cmCTest::NIGHTLY &&
|
||||||
this->GetCTestConfiguration("NightlyStartTime").empty() )
|
this->GetCTestConfiguration("NightlyStartTime").empty() )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, WARNING,
|
cmCTestOptionalLog(this, WARNING,
|
||||||
"WARNING: No nightly start time found please set in"
|
"WARNING: No nightly start time found please set in CTestConfig.cmake"
|
||||||
" CTestConfig.cmake or DartConfig.cmake" << std::endl);
|
" or DartConfig.cmake" << std::endl, quiet);
|
||||||
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl,
|
||||||
|
quiet);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -507,8 +512,8 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
|||||||
cmMakefile *mf = lg->GetMakefile();
|
cmMakefile *mf = lg->GetMakefile();
|
||||||
if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(), mf) )
|
if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(), mf) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, "Cannot find custom configuration file tree"
|
cmCTestOptionalLog(this, DEBUG,
|
||||||
<< std::endl);
|
"Cannot find custom configuration file tree" << std::endl, quiet);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -583,9 +588,10 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
|||||||
}
|
}
|
||||||
if (tag.empty() || (0 != command) || this->Parts[PartStart])
|
if (tag.empty() || (0 != command) || this->Parts[PartStart])
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, "TestModel: " << this->GetTestModelString()
|
cmCTestOptionalLog(this, DEBUG, "TestModel: " <<
|
||||||
<< std::endl);
|
this->GetTestModelString() << std::endl, quiet);
|
||||||
cmCTestLog(this, DEBUG, "TestModel: " << this->TestModel << std::endl);
|
cmCTestOptionalLog(this, DEBUG, "TestModel: " <<
|
||||||
|
this->TestModel << std::endl, quiet);
|
||||||
if ( this->TestModel == cmCTest::NIGHTLY )
|
if ( this->TestModel == cmCTest::NIGHTLY )
|
||||||
{
|
{
|
||||||
lctime = this->GetNightlyTime(
|
lctime = this->GetNightlyTime(
|
||||||
@ -609,8 +615,8 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
|||||||
ofs.close();
|
ofs.close();
|
||||||
if ( 0 == command )
|
if ( 0 == command )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, OUTPUT, "Create new tag: " << tag << " - "
|
cmCTestOptionalLog(this, OUTPUT, "Create new tag: " << tag << " - "
|
||||||
<< this->GetTestModelString() << std::endl);
|
<< this->GetTestModelString() << std::endl, quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -630,8 +636,8 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this, OUTPUT, " Use existing tag: " << tag << " - "
|
cmCTestOptionalLog(this, OUTPUT, " Use existing tag: " << tag << " - "
|
||||||
<< this->GetTestModelString() << std::endl);
|
<< this->GetTestModelString() << std::endl, quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->CurrentTag = tag;
|
this->CurrentTag = tag;
|
||||||
@ -675,8 +681,8 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
|||||||
|
|
||||||
if ( !fname.empty() )
|
if ( !fname.empty() )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, OUTPUT, " Reading ctest configuration file: "
|
cmCTestOptionalLog(this, OUTPUT, " Reading ctest configuration file: "
|
||||||
<< fname << std::endl);
|
<< fname << std::endl, command->ShouldBeQuiet());
|
||||||
bool readit = mf->ReadListFile(mf->GetCurrentListFile(),
|
bool readit = mf->ReadListFile(mf->GetCurrentListFile(),
|
||||||
fname.c_str() );
|
fname.c_str() );
|
||||||
if(!readit)
|
if(!readit)
|
||||||
@ -689,19 +695,20 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this, WARNING,
|
cmCTestOptionalLog(this, WARNING,
|
||||||
"Cannot locate CTest configuration: in BuildDirectory: "
|
"Cannot locate CTest configuration: in BuildDirectory: "
|
||||||
<< bld_dir_fname << std::endl);
|
<< bld_dir_fname << std::endl, command->ShouldBeQuiet());
|
||||||
cmCTestLog(this, WARNING,
|
cmCTestOptionalLog(this, WARNING,
|
||||||
"Cannot locate CTest configuration: in SourceDirectory: "
|
"Cannot locate CTest configuration: in SourceDirectory: "
|
||||||
<< src_dir_fname << std::endl);
|
<< src_dir_fname << std::endl, command->ShouldBeQuiet());
|
||||||
}
|
}
|
||||||
|
|
||||||
this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime",
|
this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime",
|
||||||
"CTEST_NIGHTLY_START_TIME");
|
"CTEST_NIGHTLY_START_TIME", command->ShouldBeQuiet());
|
||||||
this->SetCTestConfigurationFromCMakeVariable(mf, "Site", "CTEST_SITE");
|
this->SetCTestConfigurationFromCMakeVariable(mf, "Site", "CTEST_SITE",
|
||||||
|
command->ShouldBeQuiet());
|
||||||
this->SetCTestConfigurationFromCMakeVariable(mf, "BuildName",
|
this->SetCTestConfigurationFromCMakeVariable(mf, "BuildName",
|
||||||
"CTEST_BUILD_NAME");
|
"CTEST_BUILD_NAME", command->ShouldBeQuiet());
|
||||||
const char* dartVersion = mf->GetDefinition("CTEST_DART_SERVER_VERSION");
|
const char* dartVersion = mf->GetDefinition("CTEST_DART_SERVER_VERSION");
|
||||||
if ( dartVersion )
|
if ( dartVersion )
|
||||||
{
|
{
|
||||||
@ -720,8 +727,9 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cmCTestLog(this, OUTPUT, " Use " << this->GetTestModelString()
|
cmCTestOptionalLog(this, OUTPUT, " Use " << this->GetTestModelString()
|
||||||
<< " tag: " << this->GetCurrentTag() << std::endl);
|
<< " tag: " << this->GetCurrentTag() << std::endl,
|
||||||
|
command->ShouldBeQuiet());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2740,10 +2748,11 @@ void cmCTest::DetermineNextDayStop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void cmCTest::SetCTestConfiguration(const char *name, const char* value)
|
void cmCTest::SetCTestConfiguration(const char *name, const char* value,
|
||||||
|
bool suppress)
|
||||||
{
|
{
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "SetCTestConfiguration:"
|
cmCTestOptionalLog(this, HANDLER_VERBOSE_OUTPUT, "SetCTestConfiguration:"
|
||||||
<< name << ":" << (value ? value : "(null)") << "\n");
|
<< name << ":" << (value ? value : "(null)") << "\n", suppress);
|
||||||
|
|
||||||
if ( !name )
|
if ( !name )
|
||||||
{
|
{
|
||||||
@ -2857,7 +2866,7 @@ void cmCTest::SetConfigType(const char* ct)
|
|||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf,
|
bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf,
|
||||||
const char* dconfig, const std::string& cmake_var)
|
const char* dconfig, const std::string& cmake_var, bool suppress)
|
||||||
{
|
{
|
||||||
const char* ctvar;
|
const char* ctvar;
|
||||||
ctvar = mf->GetDefinition(cmake_var);
|
ctvar = mf->GetDefinition(cmake_var);
|
||||||
@ -2865,10 +2874,10 @@ bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf,
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||||
"SetCTestConfigurationFromCMakeVariable:"
|
"SetCTestConfigurationFromCMakeVariable:" << dconfig << ":" <<
|
||||||
<< dconfig << ":" << cmake_var << std::endl);
|
cmake_var << std::endl, suppress);
|
||||||
this->SetCTestConfiguration(dconfig, ctvar);
|
this->SetCTestConfiguration(dconfig, ctvar, suppress);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3033,12 +3042,17 @@ void cmCTest::InitStreams()
|
|||||||
this->StreamErr = &std::cerr;
|
this->StreamErr = &std::cerr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmCTest::Log(int logType, const char* file, int line, const char* msg)
|
void cmCTest::Log(int logType, const char* file, int line, const char* msg,
|
||||||
|
bool suppress)
|
||||||
{
|
{
|
||||||
if ( !msg || !*msg )
|
if ( !msg || !*msg )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ( suppress && logType != cmCTest::ERROR_MESSAGE )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ( this->OutputLogFile )
|
if ( this->OutputLogFile )
|
||||||
{
|
{
|
||||||
bool display = true;
|
bool display = true;
|
||||||
|
@ -33,6 +33,14 @@ class cmCTestStartCommand;
|
|||||||
cmCTestLog_msg.str().c_str());\
|
cmCTestLog_msg.str().c_str());\
|
||||||
} while ( 0 )
|
} while ( 0 )
|
||||||
|
|
||||||
|
#define cmCTestOptionalLog(ctSelf, logType, msg, suppress) \
|
||||||
|
do { \
|
||||||
|
std::ostringstream cmCTestLog_msg; \
|
||||||
|
cmCTestLog_msg << msg; \
|
||||||
|
(ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__,\
|
||||||
|
cmCTestLog_msg.str().c_str(), suppress);\
|
||||||
|
} while ( 0 )
|
||||||
|
|
||||||
#ifdef cerr
|
#ifdef cerr
|
||||||
# undef cerr
|
# undef cerr
|
||||||
#endif
|
#endif
|
||||||
@ -173,7 +181,8 @@ public:
|
|||||||
static int GetTestModelFromString(const char* str);
|
static int GetTestModelFromString(const char* str);
|
||||||
static std::string CleanString(const std::string& str);
|
static std::string CleanString(const std::string& str);
|
||||||
std::string GetCTestConfiguration(const std::string& name);
|
std::string GetCTestConfiguration(const std::string& name);
|
||||||
void SetCTestConfiguration(const char *name, const char* value);
|
void SetCTestConfiguration(const char *name, const char* value,
|
||||||
|
bool suppress=false);
|
||||||
void EmptyCTestConfiguration();
|
void EmptyCTestConfiguration();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -332,7 +341,7 @@ public:
|
|||||||
* Set the CTest variable from CMake variable
|
* Set the CTest variable from CMake variable
|
||||||
*/
|
*/
|
||||||
bool SetCTestConfigurationFromCMakeVariable(cmMakefile* mf,
|
bool SetCTestConfigurationFromCMakeVariable(cmMakefile* mf,
|
||||||
const char* dconfig, const std::string& cmake_var);
|
const char* dconfig, const std::string& cmake_var, bool suppress=false);
|
||||||
|
|
||||||
//! Make string safe to be send as an URL
|
//! Make string safe to be send as an URL
|
||||||
static std::string MakeURLSafe(const std::string&);
|
static std::string MakeURLSafe(const std::string&);
|
||||||
@ -376,7 +385,8 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Add log to the output
|
//! Add log to the output
|
||||||
void Log(int logType, const char* file, int line, const char* msg);
|
void Log(int logType, const char* file, int line, const char* msg,
|
||||||
|
bool suppress=false);
|
||||||
|
|
||||||
//! Get the version of dart server
|
//! Get the version of dart server
|
||||||
int GetDartVersion() { return this->DartVersion; }
|
int GetDartVersion() { return this->DartVersion; }
|
||||||
|
@ -13,6 +13,9 @@ function(run_child)
|
|||||||
message(FATAL_ERROR "Child failed (${FAILED}), output is\n ${OUTPUT}\n"
|
message(FATAL_ERROR "Child failed (${FAILED}), output is\n ${OUTPUT}\n"
|
||||||
"Command = [${ARGN}]\n")
|
"Command = [${ARGN}]\n")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Pass output back up to the parent scope for possible further inspection.
|
||||||
|
set(OUTPUT "${OUTPUT}" PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
@ -269,6 +272,9 @@ function(run_dashboard_script bin_dir)
|
|||||||
Updated{subdir/bar.txt}
|
Updated{subdir/bar.txt}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Pass console output up to the parent, in case they'd like to inspect it.
|
||||||
|
set(OUTPUT "${OUTPUT}" PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
@ -334,3 +334,36 @@ set(CTEST_UPDATE_VERSION_ONLY TRUE)
|
|||||||
# Run the dashboard script with CTest.
|
# Run the dashboard script with CTest.
|
||||||
set(NO_UPDATE 1)
|
set(NO_UPDATE 1)
|
||||||
run_dashboard_script(dash-binary-no-update)
|
run_dashboard_script(dash-binary-no-update)
|
||||||
|
|
||||||
|
rewind_source(dash-source)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Test ctest_update(QUIET)
|
||||||
|
set(NO_UPDATE 0)
|
||||||
|
message("Running CTest Dashboard Script (update quietly)...")
|
||||||
|
|
||||||
|
create_dashboard_script(dash-binary-quiet
|
||||||
|
"# git command configuration
|
||||||
|
set(CTEST_GIT_COMMAND \"${GIT}\")
|
||||||
|
set(CTEST_GIT_UPDATE_OPTIONS)
|
||||||
|
set(CTEST_GIT_UPDATE_CUSTOM \${CTEST_GIT_COMMAND} pull origin master)
|
||||||
|
")
|
||||||
|
|
||||||
|
# We need to modify the created dashboard script to include our "QUIET"
|
||||||
|
# option.
|
||||||
|
set(filename "${TOP}/dash-binary-quiet.cmake")
|
||||||
|
file(READ "${filename}" contents)
|
||||||
|
string(REPLACE
|
||||||
|
[=[ctest_update(SOURCE ${CTEST_SOURCE_DIRECTORY})]=]
|
||||||
|
[=[ctest_update(SOURCE ${CTEST_SOURCE_DIRECTORY} QUIET)]=]
|
||||||
|
contents
|
||||||
|
"${contents}")
|
||||||
|
file(WRITE "${filename}" "${contents}")
|
||||||
|
|
||||||
|
# Run the dashboard script with CTest.
|
||||||
|
run_dashboard_script(dash-binary-quiet)
|
||||||
|
|
||||||
|
# Make sure the output seems quiet.
|
||||||
|
if("${OUTPUT}" MATCHES "Updating the repository")
|
||||||
|
message(FATAL_ERROR "Found 'Updating the repository' in quiet output")
|
||||||
|
endif()
|
||||||
|
@ -129,7 +129,15 @@ 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_build)
|
||||||
|
add_RunCMake_test(ctest_configure)
|
||||||
|
if(COVERAGE_COMMAND)
|
||||||
|
add_RunCMake_test(ctest_coverage -DCOVERAGE_COMMAND=${COVERAGE_COMMAND})
|
||||||
|
endif()
|
||||||
|
add_RunCMake_test(ctest_start)
|
||||||
add_RunCMake_test(ctest_submit)
|
add_RunCMake_test(ctest_submit)
|
||||||
|
add_RunCMake_test(ctest_test)
|
||||||
|
add_RunCMake_test(ctest_upload)
|
||||||
add_RunCMake_test(file)
|
add_RunCMake_test(file)
|
||||||
add_RunCMake_test(find_file)
|
add_RunCMake_test(find_file)
|
||||||
add_RunCMake_test(find_library)
|
add_RunCMake_test(find_library)
|
||||||
|
12
Tests/RunCMake/ctest_build/BuildQuiet-stdout.txt
Normal file
12
Tests/RunCMake/ctest_build/BuildQuiet-stdout.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Run dashboard with model Experimental
|
||||||
|
Source directory: .*/Tests/RunCMake/ctest_build/BuildQuiet
|
||||||
|
Build directory: .*/Tests/RunCMake/ctest_build/BuildQuiet-build
|
||||||
|
Reading ctest configuration file: .*/Tests/RunCMake/ctest_build/BuildQuiet/CTestConfig.cmake
|
||||||
|
Site: test-site
|
||||||
|
Build name: test-build-name
|
||||||
|
Use Experimental tag: [0-9-]+
|
||||||
|
Configure project
|
||||||
|
Each . represents 1024 bytes of output
|
||||||
|
. Size of output: 0K
|
||||||
|
0 Compiler errors
|
||||||
|
0 Compiler warnings
|
4
Tests/RunCMake/ctest_build/CMakeLists.txt.in
Normal file
4
Tests/RunCMake/ctest_build/CMakeLists.txt.in
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
project(CTestBuild@CASE_NAME@ NONE)
|
||||||
|
include(CTest)
|
||||||
|
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
|
1
Tests/RunCMake/ctest_build/CTestConfig.cmake.in
Normal file
1
Tests/RunCMake/ctest_build/CTestConfig.cmake.in
Normal file
@ -0,0 +1 @@
|
|||||||
|
set(CTEST_PROJECT_NAME "CTestBuild@CASE_NAME@")
|
10
Tests/RunCMake/ctest_build/RunCMakeTest.cmake
Normal file
10
Tests/RunCMake/ctest_build/RunCMakeTest.cmake
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
include(RunCTest)
|
||||||
|
|
||||||
|
set(CASE_CTEST_BUILD_ARGS "")
|
||||||
|
|
||||||
|
function(run_ctest_build CASE_NAME)
|
||||||
|
set(CASE_CTEST_BUILD_ARGS "${ARGN}")
|
||||||
|
run_ctest(${CASE_NAME})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
run_ctest_build(BuildQuiet QUIET)
|
15
Tests/RunCMake/ctest_build/test.cmake.in
Normal file
15
Tests/RunCMake/ctest_build/test.cmake.in
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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_build_args "@CASE_CTEST_BUILD_ARGS@")
|
||||||
|
ctest_start(Experimental)
|
||||||
|
ctest_configure()
|
||||||
|
ctest_build(${ctest_build_args})
|
4
Tests/RunCMake/ctest_configure/CMakeLists.txt.in
Normal file
4
Tests/RunCMake/ctest_configure/CMakeLists.txt.in
Normal 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)
|
1
Tests/RunCMake/ctest_configure/CTestConfig.cmake.in
Normal file
1
Tests/RunCMake/ctest_configure/CTestConfig.cmake.in
Normal file
@ -0,0 +1 @@
|
|||||||
|
set(CTEST_PROJECT_NAME "CTestConfigure@CASE_NAME@")
|
9
Tests/RunCMake/ctest_configure/ConfigureQuiet-stdout.txt
Normal file
9
Tests/RunCMake/ctest_configure/ConfigureQuiet-stdout.txt
Normal file
@ -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
|
10
Tests/RunCMake/ctest_configure/RunCMakeTest.cmake
Normal file
10
Tests/RunCMake/ctest_configure/RunCMakeTest.cmake
Normal file
@ -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)
|
14
Tests/RunCMake/ctest_configure/test.cmake.in
Normal file
14
Tests/RunCMake/ctest_configure/test.cmake.in
Normal file
@ -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})
|
4
Tests/RunCMake/ctest_coverage/CMakeLists.txt.in
Normal file
4
Tests/RunCMake/ctest_coverage/CMakeLists.txt.in
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
project(CTestCoverage@CASE_NAME@ NONE)
|
||||||
|
include(CTest)
|
||||||
|
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
|
1
Tests/RunCMake/ctest_coverage/CTestConfig.cmake.in
Normal file
1
Tests/RunCMake/ctest_coverage/CTestConfig.cmake.in
Normal file
@ -0,0 +1 @@
|
|||||||
|
set(CTEST_PROJECT_NAME "CTestCoverage@CASE_NAME@")
|
1
Tests/RunCMake/ctest_coverage/CoverageQuiet-stdout.txt
Normal file
1
Tests/RunCMake/ctest_coverage/CoverageQuiet-stdout.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
sec$
|
10
Tests/RunCMake/ctest_coverage/RunCMakeTest.cmake
Normal file
10
Tests/RunCMake/ctest_coverage/RunCMakeTest.cmake
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
include(RunCTest)
|
||||||
|
|
||||||
|
set(CASE_CTEST_COVERAGE_ARGS "")
|
||||||
|
|
||||||
|
function(run_ctest_coverage CASE_NAME)
|
||||||
|
set(CASE_CTEST_COVERAGE_ARGS "${ARGN}")
|
||||||
|
run_ctest(${CASE_NAME})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
run_ctest_coverage(CoverageQuiet QUIET)
|
18
Tests/RunCMake/ctest_coverage/test.cmake.in
Normal file
18
Tests/RunCMake/ctest_coverage/test.cmake.in
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
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_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
|
||||||
|
|
||||||
|
set(ctest_coverage_args "@CASE_CTEST_COVERAGE_ARGS@")
|
||||||
|
ctest_start(Experimental)
|
||||||
|
ctest_configure()
|
||||||
|
ctest_build()
|
||||||
|
ctest_test()
|
||||||
|
ctest_coverage(${ctest_coverage_args})
|
1
Tests/RunCMake/ctest_memcheck/DummyQuiet-stdout.txt
Normal file
1
Tests/RunCMake/ctest_memcheck/DummyQuiet-stdout.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
0 tests failed out of 1$
|
@ -130,3 +130,4 @@ run_mc_test(DummyValgrindNoLogFile "${PSEUDO_VALGRIND_NOLOG}")
|
|||||||
run_mc_test(DummyBCNoLogFile "${PSEUDO_BC_NOLOG}")
|
run_mc_test(DummyBCNoLogFile "${PSEUDO_BC_NOLOG}")
|
||||||
run_mc_test(NotExist "\${CTEST_BINARY_DIRECTORY}/no-memcheck-exe")
|
run_mc_test(NotExist "\${CTEST_BINARY_DIRECTORY}/no-memcheck-exe")
|
||||||
run_mc_test(Unknown "\${CMAKE_COMMAND}")
|
run_mc_test(Unknown "\${CMAKE_COMMAND}")
|
||||||
|
run_mc_test(DummyQuiet "${PSEUDO_VALGRIND}" -DMEMCHECK_ARGS=QUIET)
|
||||||
|
@ -21,4 +21,4 @@ set(CTEST_MEMORYCHECK_TYPE "${MEMCHECK_TYPE}")
|
|||||||
CTEST_START(Experimental)
|
CTEST_START(Experimental)
|
||||||
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
||||||
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
||||||
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res ${MEMCHECK_ARGS})
|
||||||
|
4
Tests/RunCMake/ctest_start/CMakeLists.txt.in
Normal file
4
Tests/RunCMake/ctest_start/CMakeLists.txt.in
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
project(CTestStart@CASE_NAME@ NONE)
|
||||||
|
include(CTest)
|
||||||
|
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
|
1
Tests/RunCMake/ctest_start/CTestConfig.cmake.in
Normal file
1
Tests/RunCMake/ctest_start/CTestConfig.cmake.in
Normal file
@ -0,0 +1 @@
|
|||||||
|
set(CTEST_PROJECT_NAME "CTestStart@CASE_NAME@")
|
10
Tests/RunCMake/ctest_start/RunCMakeTest.cmake
Normal file
10
Tests/RunCMake/ctest_start/RunCMakeTest.cmake
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
include(RunCTest)
|
||||||
|
|
||||||
|
set(CASE_CTEST_START_ARGS "")
|
||||||
|
|
||||||
|
function(run_ctest_start CASE_NAME)
|
||||||
|
set(CASE_CTEST_START_ARGS "${ARGN}")
|
||||||
|
run_ctest(${CASE_NAME})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
run_ctest_start(StartQuiet Experimental QUIET)
|
1
Tests/RunCMake/ctest_start/StartQuiet-stdout.txt
Normal file
1
Tests/RunCMake/ctest_start/StartQuiet-stdout.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
^$
|
13
Tests/RunCMake/ctest_start/test.cmake.in
Normal file
13
Tests/RunCMake/ctest_start/test.cmake.in
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
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_start_args "@CASE_CTEST_START_ARGS@")
|
||||||
|
ctest_start(${ctest_start_args})
|
1
Tests/RunCMake/ctest_submit/CDashSubmitQuiet-result.txt
Normal file
1
Tests/RunCMake/ctest_submit/CDashSubmitQuiet-result.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
(-1|255)
|
4
Tests/RunCMake/ctest_submit/CDashSubmitQuiet-stderr.txt
Normal file
4
Tests/RunCMake/ctest_submit/CDashSubmitQuiet-stderr.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
*Error when uploading file: .*/Configure.xml
|
||||||
|
*Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?|The requested URL returned error:.*)
|
||||||
|
*Problems when submitting via HTTP
|
||||||
|
*Error in read script: .*/Tests/RunCMake/ctest_submit/CDashSubmitQuiet/test.cmake
|
3
Tests/RunCMake/ctest_submit/CDashSubmitQuiet-stdout.txt
Normal file
3
Tests/RunCMake/ctest_submit/CDashSubmitQuiet-stdout.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Configure project
|
||||||
|
Each . represents 1024 bytes of output
|
||||||
|
. Size of output: 0K$
|
@ -24,6 +24,7 @@ run_ctest_submit(CDashUploadFILES CDASH_UPLOAD bad-upload FILES)
|
|||||||
run_ctest_submit(CDashUploadRETRY_COUNT CDASH_UPLOAD bad-upload RETRY_COUNT)
|
run_ctest_submit(CDashUploadRETRY_COUNT CDASH_UPLOAD bad-upload RETRY_COUNT)
|
||||||
run_ctest_submit(CDashUploadRETRY_DELAY CDASH_UPLOAD bad-upload RETRY_DELAY)
|
run_ctest_submit(CDashUploadRETRY_DELAY CDASH_UPLOAD bad-upload RETRY_DELAY)
|
||||||
run_ctest_submit(CDashUploadNone CDASH_UPLOAD)
|
run_ctest_submit(CDashUploadNone CDASH_UPLOAD)
|
||||||
|
run_ctest_submit(CDashSubmitQuiet QUIET)
|
||||||
|
|
||||||
function(run_ctest_CDashUploadFTP)
|
function(run_ctest_CDashUploadFTP)
|
||||||
set(CASE_DROP_METHOD ftp)
|
set(CASE_DROP_METHOD ftp)
|
||||||
|
4
Tests/RunCMake/ctest_test/CMakeLists.txt.in
Normal file
4
Tests/RunCMake/ctest_test/CMakeLists.txt.in
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
project(CTestTest@CASE_NAME@ NONE)
|
||||||
|
include(CTest)
|
||||||
|
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
|
1
Tests/RunCMake/ctest_test/CTestConfig.cmake.in
Normal file
1
Tests/RunCMake/ctest_test/CTestConfig.cmake.in
Normal file
@ -0,0 +1 @@
|
|||||||
|
set(CTEST_PROJECT_NAME "CTestTest@CASE_NAME@")
|
10
Tests/RunCMake/ctest_test/RunCMakeTest.cmake
Normal file
10
Tests/RunCMake/ctest_test/RunCMakeTest.cmake
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
include(RunCTest)
|
||||||
|
|
||||||
|
set(CASE_CTEST_TEST_ARGS "")
|
||||||
|
|
||||||
|
function(run_ctest_test CASE_NAME)
|
||||||
|
set(CASE_CTEST_TEST_ARGS "${ARGN}")
|
||||||
|
run_ctest(${CASE_NAME})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
run_ctest_test(TestQuiet QUIET)
|
2
Tests/RunCMake/ctest_test/TestQuiet-stdout.txt
Normal file
2
Tests/RunCMake/ctest_test/TestQuiet-stdout.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
0 Compiler warnings
|
||||||
|
Start 1: RunCMakeVersion
|
16
Tests/RunCMake/ctest_test/test.cmake.in
Normal file
16
Tests/RunCMake/ctest_test/test.cmake.in
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
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_test_args "@CASE_CTEST_TEST_ARGS@")
|
||||||
|
ctest_start(Experimental)
|
||||||
|
ctest_configure()
|
||||||
|
ctest_build()
|
||||||
|
ctest_test(${ctest_test_args})
|
4
Tests/RunCMake/ctest_upload/CMakeLists.txt.in
Normal file
4
Tests/RunCMake/ctest_upload/CMakeLists.txt.in
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
project(CTestUpload@CASE_NAME@ NONE)
|
||||||
|
include(CTest)
|
||||||
|
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
|
1
Tests/RunCMake/ctest_upload/CTestConfig.cmake.in
Normal file
1
Tests/RunCMake/ctest_upload/CTestConfig.cmake.in
Normal file
@ -0,0 +1 @@
|
|||||||
|
set(CTEST_PROJECT_NAME "CTestUpload@CASE_NAME@")
|
10
Tests/RunCMake/ctest_upload/RunCMakeTest.cmake
Normal file
10
Tests/RunCMake/ctest_upload/RunCMakeTest.cmake
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
include(RunCTest)
|
||||||
|
|
||||||
|
set(CASE_CTEST_UPLOAD_ARGS "")
|
||||||
|
|
||||||
|
function(run_ctest_upload CASE_NAME)
|
||||||
|
set(CASE_CTEST_UPLOAD_ARGS "${ARGN}")
|
||||||
|
run_ctest(${CASE_NAME})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
run_ctest_upload(UploadQuiet QUIET)
|
1
Tests/RunCMake/ctest_upload/UploadQuiet-stdout.txt
Normal file
1
Tests/RunCMake/ctest_upload/UploadQuiet-stdout.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Use Experimental tag: [0-9-]+$
|
14
Tests/RunCMake/ctest_upload/test.cmake.in
Normal file
14
Tests/RunCMake/ctest_upload/test.cmake.in
Normal file
@ -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_upload_args "@CASE_CTEST_UPLOAD_ARGS@")
|
||||||
|
ctest_start(Experimental)
|
||||||
|
ctest_upload(FILES "${CTEST_SOURCE_DIRECTORY}/CMakeLists.txt" ${ctest_upload_args})
|
Loading…
x
Reference in New Issue
Block a user