Since the Sanitizers write out one log file per process, a single
test might have more than one log file. This commit allows ctest
to read all of the log files found for a particual test.
Before this commit, you would have to run ctest -S mode to get
MemoryCheckType to work. This is because CMAKE_COMMAND was not set.
The fix is to use cmSystemTools::GetCMakeCommand instead.
This adds support for memory and leak sanitizers. This is built into
clang and gcc 4.8 and new compilers. It is activated with a -f switch
during compile.
This commit adds support for ThreadSanitizer to ctest. ThreadSanitizer
is part of the clang compiler and also gcc 4.8 and later. You have to
compile the code with special flags. Then your code gets the the
ThreadSanitizer ability built into it. To pass options to the
ThreadSanitizer you use an environment variable. This commit teaches
ctest to parse the output from ThreadSanitizer and send it to CDash.
Send status messages to the CTest HANDLER_OUTPUT log since they are part
of the script handler output. This also ensures they appear inline with
other test command handler output.
The ctest launcher code did not respect the number of errors and
warnings limits. Limit the number of launcher report fragments that we
report in the final submission.
For testing purposes CMake creates dummy memory checkers. The dummy checkers
are in the CMake build tree. Before this change when the path contained the
string valgrind, such as CMake-valgrind, all the checkers were thought to
be valgrind, and this caused tests to fail.
Add the ability to parse the XML output of the Jacoco tool.
Jacoco (www.eclemma.org/jacoco) is a Java coverage tool.
Add and integrate a class for the parser and
include a test which utilizes the new parser.
Add support for Cobertura coverage files written by Java.
Add a test which uses the report from a Java run of Cobertura to calculate coverage.
In the documentation of CTEST_COVERAGE_COMMAND, give a sample .sh file to merge
the Cobertura .ser files and generate the XML report from the merged file.
The coverage.py tool writes out an XML that conforms to the Cobertura
Coverage tool standard. Rename the cmParsePythonCoverage files to
instead be cmParseCoberturaCoverage.
If the coverage.py source file is not found in the source directory, the
build directory is first searched before raising an error.
This is necessary because it is a valid workflow to build a Python
package from source, then install this package to a virtualenv that
lives in the build directory. Tests will run against this deployed
package and therefore the covered source files will be found in a
subdirectory of the build directory, and not anywhere in the source
directory.
Fix the MUMPS coverage parser:
* Account for tabs after entry points
* Stop double incrementing lines that have explicit calls to the 0 line
* If a line has been previously marked as non executable, but then
contains a count, increment it an extra one to push it back into
the executable code set.
Add a custom routine and corresponding coverage files in the test case.
This file is smaller and has cmcov/mcov files that have data for only
that routine.
Factor a common callback type out of StdoutCallback. Add an equivalent
StderrCallback. While at it, use "size_t" for the data length instead
of "int".
Teach "ctest --build-and-test" to capture the Stderr callback because
output sent through it is part of the logical CMake process output.
If creation of the global generator fails, return early with an error
message instead of trying to use the generator and crashing.
Add a CTestTestBadGenerator test to cover this case.
Reported-by: Mathieu Malaterre <malat@debian.org>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747306
By default, Intel compiler coverage tools generate HTML files as
reports, but the option -txtlcov can be given to codecov to output a
coverage file with LCov format.
To use Intel coverage:
* build the project with coverage flags
* run the application
* run profmerge
* run codecov
The output file will be "build_dir/CodeCoverage/SRCFILEDIR.LCOV".
Ask users to compile with -prof-dir${BUILD_DIR} instead of searching
the entire build tree recursively to find coverage files.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.
The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
My last related commit e5e3f3d4 (CTest: filter /showIncludes output from
ninja compile launcher, 2013-12-01) filtered /showIncludes messages from
the generated xml output but they also need to be filtered in
ScrapeLog(). Otherwise they are being detected as warnings when using
compilers withs english diagnostics.
Mark unknown revisions as such and fail instead of reporting revision 0.
Otherwise CTest reports massive file updates between revisions when the
server timeouts while trying to fetch the current revision number.
The first regression resulted in endless looping due to unrun test
dependencies. The second regression prioritized all tests with dependencies
in serial test runs.
The --build-options option consumes all following arguments until either
--build-target or --test-command. Fix the logic to allow this to be
zero options.
GenerateBuildCommand now knows how to lookup CMAKE_MAKE_PROGRAM or
choose a generator-provided default build tool. Therefore the
--build-makeprogram can now be optional and simply override the
default selection when provided.
Note that with --build-nocmake we now need to load the cache in order to
make the CMAKE_MAKE_PROGRAM entry available to GenerateBuildCommand.