Commit Graph

99 Commits

Author SHA1 Message Date
Nils Gladitz eb1d6cef2f CTest: clean TargetDirs between unrelated coverage runs (issue 13143) 2013-10-29 08:13:21 +01:00
Patrick Reynolds d0ec3a01a6 Adding support for the Python coverage.py tool.
This assumes that coverage.py has been run in such a way to produce its
standard XML output. This uses the Cobertura schema and should be somewhat
generalizable.
2013-10-08 09:20:30 -04:00
David Cole 61ace1df26 CTest: Coverage handler: expect certain output lines from gcov 4.7 (#13657)
And do not report them as errors.
2012-12-10 17:03:57 -05:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
David Cole 8e9101a0cb Merge topic 'mumps_coverage'
c806b23 CDash now supports lots of files in coverage. So, show all files.
761d931 Do not try to run bullseye coverage if COVFILE env is empty.
5b69ce4 Update test data to match new coverage format.
1b418f1 Change GT.M Coverage Parser global
b0c07a1 Disable bullseye coverage for mumps coverage test.
0a169e6 Remove uncovered files from cache coverage data.
a7abf5e Add ability to specify more than one package directory or coverage directory.
220afca Use <TARGET_FILE> expression to run ctest so it works with Xcode and VS IDE.
62f6bce Use a script to run the test because WORKING_DIRECTORY is not in 2.8.2.
f5c5db0 Fix some warnings and a bug where it went past the length of a vector.
7955e99 Add support for Cache coverage.
a86cd33 Add virutal destructor to silence warning.
319eeb0 Add test for mumps coverage. Also refactor code to prepare for cache coverage.
72210c2 Fix line length.
dd07161 Fix warning about char* instead of const char*.
e6412e0 Add support to ctest for GTM mumps coverage.
2012-05-17 14:58:54 -04:00
Bill Hoffman c806b23cfe CDash now supports lots of files in coverage. So, show all files.
Prior to this commit the mumps coverage only showed files that
had at least one line of coverage. Now 0% covered files are shown
as well.
2012-05-11 15:22:25 -04:00
Bill Hoffman 761d93129f Do not try to run bullseye coverage if COVFILE env is empty. 2012-05-08 14:47:13 -04:00
David Cole 56f499dcef CTest: Modify reg ex so it also works with gcov 4.7 output (#13121) 2012-05-03 17:08:19 -04:00
Bill Hoffman 7955e995ec Add support for Cache coverage.
This adds support for Cache coverage parsing. A test is added
that does a basic run of the coverage on a small bit of data.
2012-05-01 17:00:43 -04:00
Bill Hoffman 319eeb0247 Add test for mumps coverage. Also refactor code to prepare for cache coverage.
Add a simple test to make sure the GTM mumps coverage is working.
Also refactor the code so that cache coverage can be added.
2012-05-01 13:35:07 -04:00
Bill Hoffman 72210c2662 Fix line length. 2012-04-26 08:33:27 -04:00
Bill Hoffman e6412e084e Add support to ctest for GTM mumps coverage. 2012-04-25 17:04:28 -04:00
Brad King 3247d63abb ctest_coverage: Save/restore LC_ALL around gcov (#13136)
Commit ffbe61bb (make sure english is used for output of gcov, 2008-05-10)
taught ctest_coverage to set LC_ALL=POSIX to get English output from gcov.
Use the more portable value LC_ALL=C and restore the original value when
finished.
2012-04-16 08:48:16 -04:00
Rolf Eike Beer 58d75e22ae CTest: mark all gcov covered files as covered
Even if there are no lines covered in the file the gcov coverage report still
contains valueable information, the amount of uncovered lines and which exactly
they are. Set 'Covered="true"' for files we have a gcov report for even if they
have no lines covered. Otherwise CDash will neither show the uncovered line
count nor the detailed coverage report for this file.

When CTEST_EXTRA_COVERAGE_GLOB was used to collect otherwise uncovered files
'Covered="true"' was unconditionally set, so this can't be worse here.
2012-02-15 21:45:30 +01:00
David Cole 2f309cba45 CTest: Add COVERAGE_EXTRA_FLAGS cache variable (#12490)
COVERAGE_EXTRA_FLAGS is a space separated value of extra flags
that will be passed to gcov when ctest's coverage handler invokes
gcov to do coverage analysis.

Map to CoverageExtraFlags in the CTest ini file. Use default value
of "-l" to match the coverage handler's earlier behavior from ctest
2.8.4 and earlier. The fix for related issue #11717 had added a " -p"
which was the cause of both #12415 and #12490. Here, we revert that
change to the default value, so -p is no longer there by default.
The people that care to add -p may do so in their own build trees
by appending " -p" to the new cache variable COVERAGE_EXTRA_FLAGS.
2011-10-22 11:01:58 -04:00
Marco Craveiro 6e02a3b2bf CTest: Use the gcov --preserve-paths flag (#11717)
To avoid name clashes.

Before this commit, name clashes can occur when invoking gcov on a
project that uses the same file name in different directories. The
--preserve-paths flag ensures all file names have a complete path,
avoiding name clashes.
2011-02-09 16:04:15 -05:00
Kai Wasserbäch 9203e9187e Fix spelling errors reported by Lintian.
During a Lintian run on the binary packages of CMake in Debian I was
notified of many spelling mistakes.
2010-07-13 09:41:37 -04:00
Zach Mullen 9d6567a269 Extra coverage glob should subtract the explicitly defined excluded files 2010-06-11 14:17:00 -04:00
Bill Hoffman 1d4e121d9c Add php coverage to ctest. 2010-05-25 09:23:25 -04:00
Zach Mullen 38cabcd9ff Fix shadowed local warning in coverage handler 2010-05-12 09:37:43 -04:00
Zach Mullen 231cbbef80 Change coverage globbing mechanism to resolve paths earlier 2010-05-07 11:00:21 -04:00
Zach Mullen 6ea9213244 Coverage glob should search in Source dir 2010-04-23 11:22:54 -04:00
Zach Mullen 7049dff85a Implement extra coverage globbing 2010-04-23 09:20:53 -04:00
David Cole 4439f17b20 Fix issue #5668 - use CollapseFullPath when determining if covered file is within source or binary tree. Allows gcc/gcov coverage analysis using MinGW on Windows. 2009-10-12 14:51:54 -04:00
Alexander Neundorf b3040beb41 fix two more warnings from icpc
asfGlob and abfGlob were there since rev 1.3 of this file (Oct 17th 2004) and unused since
then, so remove them

Alex
2009-10-04 11:40:02 -04:00
David Cole 44bcba7461 Fix warnings in CMake source code. Suppress rampant warnings emanating from Qt files. 2009-10-01 16:47:08 -04:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King 589b4265a6 BUG: Do not produce empty coverage log files
This moves the filtering of source files to before the production of
coverage log files in order to avoid producing a CoverageLog-*.xml file
for 100 filtered-out files.  The change greatly reduces the number of
submitted coverage files when using label filters.
2009-03-11 13:31:40 -04:00
Brad King 5bc17136a3 BUG: Do not carry over file list between coverage
When performing multiple ctest_coverage() commands in a single CTest
instance we need to clear the list of CoverageLog-*.xml files for
submission.  Otherwise if the current coverage run produces fewer log
files than the previous run CTest will attempt to submit non-existing
files.
2009-03-11 13:31:33 -04:00
Brad King f3e713ba65 BUG: Avoid duplicate CTest coverage submission
This teaches ctest_coverage() to remove any existing CoverageLog-*.xml
when it creates new coverage results.  Otherwise the next ctest_submit()
may submit old coverage log files which unnecessarily.
2009-03-11 12:03:47 -04:00
Brad King 1d96c943e0 ENH: Efficiently filter CTest coverage by label
This teaches CTest to process coverage information only for object files
in targets containing labels of interest.  This change also improves
loading of global coverage information by globbing only in each target
support directory instead of the entire build tree.
2009-03-09 12:19:56 -04:00
Brad King a86e81c358 ENH: Generate a central list of target directories
This generalizes the previous CMakeFiles/LabelFiles.txt created at the
top of the build tree to a CMakeFiles/TargetDirectories.txt file.  It
lists the target support directories for all targets in the project.
Labels can still be loaded by looking for Labels.txt files in each
target directory.
2009-03-09 12:19:27 -04:00
Brad King 91a8569648 ENH: Teach ctest_coverage to filter with LABELS
This teaches ctest_coverage() to report only coverage of files labeled
with at least one label given by a new LABELS option.
2009-03-02 15:33:18 -05:00
Brad King 3078fef81c BUG: Fix coverage label reports for Bullseye
This teaches CTest to report Labels elements in the Coverage.xml file
for Bullseye coverage results.
2009-03-02 15:33:03 -05:00
Brad King c4596605df BUG: Fix coverage handler initialization
This resets coverage handler internal state on initialization so that
multiple coverage runs are independent.
2009-03-02 15:32:59 -05:00
Brad King 70b1ed2548 ENH: Teach CTest to put labels in coverage results
This teaches CTest to include source file labels in coverage dashboard
submissions.  The labels for each source are the union of the LABELS
property from the source file and all the targets in which it is built.
2009-02-13 15:17:06 -05:00
Brad King 5be7846277 STYLE: Remove unused variable 2009-02-13 15:16:58 -05:00
Brad King dc13914cd6 ENH: Create cmXMLSafe to help escapes in XML
This class provides easy syntax to efficiently insert blocks of data
into XML documents with proper escapes.  It replaces the old
cmCTest::MakeXMLSafe and cmSystemTools::MakeXMLSafe methods which
allocated extra memory instead of directly streaming the data.
2009-02-05 16:31:37 -05:00
Bill Hoffman 56ea0ad186 STYLE: fix warning 2009-01-29 09:26:40 -05:00
Bill Hoffman a26c70477c STYLE: fix warning 2009-01-28 16:56:33 -05:00
Brad King 447f5b303e ENH: Divide CTest file submission list by part
This splits the list of files for CTest to submit into those belonging
to each part.  The set is recombined just before submission.  Later this
will allow piecewise submissions.
2009-01-12 10:37:55 -05:00
Brad King cccac773ce ENH: Teach ctest_* to create appending XML files
This adds an APPEND option to the ctest_* commands which tells them to
put the Append="true" attribute in the Site element of their XML file.
2009-01-12 09:11:29 -05:00
Bill Hoffman bdfc3fadd3 ENH: add more debug stuff to CTestCTest2 so I can figure out redwall 2008-11-23 10:49:46 -05:00
David Cole 86e7a9dad8 ENH: Add RecurseThroughSymlinks data member to kwsys::Glob. Allows recursive globs to skip symlinks when necessary. Default to true for backwards compatible behavior. Used from the ctest coverage handler to avoid recursing through the '/Applications' directory on the Mac looking for *.da files... Should fix the hangs reported recently by Mac CMake dashboard submitters. 2008-08-20 13:24:16 -04:00
David Cole 5a0389a0b7 BUG: Fix issue#4792 - improve verbose and log output when ctest cannot find a file during coverage analysis. 2008-07-31 14:16:34 -04:00
David Cole f059ebff69 BUG: Fix issue #4971 - use lower case when comparing file names from gcov output on _WIN32 since sometimes the drive letters have different case. 2008-07-31 11:28:45 -04:00
Bill Hoffman ffbe61bb11 ENH: make sure english is used for output of gcov 2008-05-10 11:12:09 -04:00
Bill Hoffman 2b6ee95c1d BUG: 0006988 do not set coverage to false when it is not 2008-05-08 12:47:30 -04:00
Bill Hoffman c4093afc52 ENH: enhancements for cdash, include system information and better time entries 2008-01-30 11:17:36 -05:00
Bill Hoffman 17e94192e6 ENH: add support for CDash bullseye coverage 2007-11-16 11:32:38 -05:00