Commit Graph

45 Commits

Author SHA1 Message Date
Stephen Kelly af8a1643c1 Remove c_str calls when using stream APIs.
Use an ad-hoc clang tool for matching the calls which should be
ported.
2014-03-11 15:03:50 +01:00
Ben Boeckel b3bf31a548 stringapi: Miscellaneous char* parameters 2014-03-08 13:05:37 -05:00
Ben Boeckel 270eb96df0 strings: Remove cmStdString references
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.
2014-03-08 13:05:35 -05:00
Clinton Stimpson 5730710c86 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
Also use SystemTools::Fopen() instead of fopen().
This is to eventually support utf-8 filenames.
2014-01-07 09:27:44 -05:00
Rolf Eike Beer 6f9aaad150 CTest: create one output file per memcheck (#14303)
The output file used for memory checker runs must be unique for every test run
in parallel, so simply make them unique for every test run. Simply use the test
index to avoid collisions.
2013-08-07 22:25:48 +02:00
Rolf Eike Beer 61ddb9319b CTest: fix comment documenting cmBoundsCheckerParser class
This was obviously copied from Source/cmGlobalXCodeGenerator.cxx during
implementation but the comment was forgotten.
2013-05-09 19:25:50 +02:00
Rolf Eike Beer 3b5b758915 CTest: drop suppression for gcc 2.9.6 errors from default Valgrind flags
The --workaround-gcc296-bugs has been part of the default Valgrind flags since
Valgrind support was added in commit 5b232ded15
(ENH: Add initial memory check support which works for Valgrind, 2003-12-15).
The Valgrind manpage says that this option should be avoided if not really
needed as it may cause real errors to get ignored. If someone uses a compiler
that really needs the flag this flag should be set by the user explicitely.
Most users will never set any flags and probably never notice that they use a
flag they shouldn't.
2013-05-09 19:24:53 +02:00
Rolf Eike Beer f4994223bb CTest: remove unreachable code and CTestTestMemcheckUnknown test
The memory checker command can't be quoted at this point, because previously it
has been tested that the given file exists, which will fail if the name is
quoted. The CTestTestMemcheckUnknown test aimed to test this case, has always
failed to do so and serves no useful purpose therefore.
2013-05-09 19:22:29 +02:00
Rolf Eike Beer dde6306a48 CTest: use an output file for Valgrind (#14110)
This makes sure Valgrind output will not screw up tests that match on the
output.
2013-05-09 19:22:01 +02:00
Rolf Eike Beer d26c9b69c5 CTest: improve memory checker type detection
If the checker was explicitely set with a "TypeCommand" variable (e.g.
ValgrindCommand) then we now just believe that this is valgrind, even if
nothing in the path matches "valgrind". Only when "MemoryCheckCommand" was used
we still scan the path to find out what checker we have.
2012-10-04 23:07:31 +02:00
Rolf Eike Beer 95bc8aa6c4 CTest: fix usage of memory checker with spaces in path
The filename was escaped in cmCTestMemCheckHandler::InitializeMemoryChecking()
and again before it was written to output in
cmCTestRunTest::ComputeArguments().

Once someone uses e.g. a valgrind path with spaces this leads to double escaping
making the memory checker fail completely because of the invalid path.
2012-10-01 17:39:09 +02: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
Brad King 3da577dec0 CTest: Escape MemCheck test output for XML (#13124)
Any output that goes through CleanTestOutput must be printed through
cmXMLSafe.
2012-04-26 15:49:29 -04:00
Alexandru Ciobanu ea4416cf7b CTest: Match valgrind errors with "points to" (#12922)
Teach CTest to match valgrind errors of the format
"Syscall param ... points to uninitialised byte(s)".
2012-03-09 09:32:28 -05:00
Johannes Stallkamp eb4af16298 CTest: Fixed valgrind output parsing (#12260)
Previous code was missing some matches in the output. This commit
fixes the regular expressions used for output matching to detect
numbers reported with commas in them, too.
2011-09-05 14:31:08 -04:00
Zach Mullen 9c3a0b9f14 We will actually compress memcheck output if the server supports it.
This change won't be functional until the next release of CDash due to the
version comparison.
2011-05-26 14:50:07 -04:00
Brad King 5383657357 CTest: Avoid use of old EscapeSpaces method
Refactor how cmCTestMemCheckHandler computes the memory tester command
line options to avoid encoding them in a single string just to parse
them again.  The EscapeSpaces uses backslahes to escape spaces on UNIX
platforms, so replace other calls to it in CTest that are used to create
human-readable strings with simple double-quoting.
2010-08-18 10:14:09 -04:00
Bill Hoffman 1b48d361d8 fix number of callers to work with newer versions of valgrind 2009-11-11 08:43:15 -05:00
Bill Hoffman d7a3277fb3 Fix bug#9767 catch missing leak. 2009-10-29 08:38:04 -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
Zach Mullen b0b5ffcf5c MemCheck should now work again in ctest 2009-08-28 15:08:03 -04:00
Zach Mullen b427d1985e Added ctest -N test. Fixed ctest working directory bug. MemCheck fix coming soon... 2009-08-28 11:08:39 -04:00
Bill Hoffman bd1e91a460 BUG: fix for bug #8153 add purify suppression file and fix output to not be one big line 2009-05-27 11:14:08 -04: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
Brad King cc2092d5bb ENH: Put test labels in MemCheck results
This refactors generation of <Test> element headers and footers in
cmCTestTestHandler and re-uses it in cmCTestMemCheckHandler.  The change
removes duplicate code and enables the new <Labels> element for MemCheck
results.
2009-02-02 13:24:26 -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 c4093afc52 ENH: enhancements for cdash, include system information and better time entries 2008-01-30 11:17:36 -05:00
Bill Hoffman fa46cb5572 ENH: fix output and valgrind truncation issue 2007-08-10 16:28:48 -04:00
Bill Hoffman 6baaf296a5 ENH: add another valgrind error type 2007-08-03 16:35:22 -04:00
Bill Hoffman 2745742e09 STYLE: fix some kwstyle errors 2007-07-27 10:55:24 -04:00
Bill Hoffman 3017259ac4 ENH: add test output to valgrind output and truncate output for valgrind 2007-07-26 16:38:00 -04:00
Bill Hoffman 132cb5d479 ENH: add support for bounds checker 2007-07-24 14:43:31 -04:00
Andy Cedilnik 870f2aeb2e BUG: Replace some errors with warnings 2006-10-13 10:27:01 -04:00
Bill Hoffman 5a2668b326 ENH: add support for win64 for visual studio 2005 ide and nmake, also fix warnings produced by building for win64 2006-03-30 13:49:56 -05:00
Andy Cedilnik 386900bfdd ENH: Several cleanups and make sure things get propagated where they should. Also, allow to load CTest custom files to the actual ctest -S script 2006-03-29 12:01:24 -05:00
Andy Cedilnik 867e41d23b BUG: Couple of memcheck bugs: Log files should really be different for test and memcheck. Also make sure to not trunkate the output of the test until the valgrind or any other checking is pefrormed. 2006-03-16 11:29:12 -05:00
Andy Cedilnik 862f5df25c STYLE: Fix some style issues 2006-03-10 15:03:09 -05:00
Andy Cedilnik 6503a0eecc STYLE: Fix some style issues 2006-03-09 11:17:10 -05:00
Andy Cedilnik d9dc9b54a6 ENH: Add superclass for all commands and handlers. Improve handlers to have initialization code, and start initializing ctest when start is invoked 2005-06-17 13:04:56 -04:00
Andy Cedilnik d6f77bddc4 ENH: Pass in memcheck command options and suppresions, and change skin to tool 2005-06-15 10:53:49 -04:00
Andy Cedilnik 7f7cf5ee6b COMP: Remove ERROR reserved word or something and replace with ERROR_MESSAGE 2005-05-31 18:40:43 -04:00
Andy Cedilnik f6e5a878fc ENH: Add support for writing output file. While doing that, redesign the way ctest does output. There may still be problems with commands failing, but that should be fixed by applying the similar concept to whole CMake 2005-05-31 17:32:40 -04:00
Andy Cedilnik de57a86298 ENH: Cleanups 2005-05-03 09:40:16 -04:00
Andy Cedilnik 8fe1686510 ENH: Cleanups and add CTEST_START command 2005-02-17 10:51:52 -05:00
Andy Cedilnik c22cc421e0 ENH: Several cleanups and improvements 2005-01-27 15:54:47 -05:00