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