Commit Graph

172 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
Stephen Kelly 21c573f682 Remove some c_str() calls.
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.
2014-03-11 15:03:50 +01:00
Ben Boeckel 85fc9f26a7 stringapi: Command names 2014-03-08 13:05:39 -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
Rolf Eike Beer 3a0d164bb2 allow to mark a test as "Not Run" with a specific return code (#8466) 2014-01-14 23:57:40 +01: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
Brad King e33d8d2d77 Drop builtin command documentation
Drop all GetTerseDocumentation and GetFullDocumentation methods from
commands.  The command documentation is now in Help/command/*.rst files.
2013-10-16 09:22:36 -04:00
Brad King 5bf7102505 Merge topic 'ctest_rerun_failed'
eb2decc ctest: Add --rerun-failed option
2013-10-08 09:53:17 -04:00
Zack Galbreath eb2decc02d ctest: Add --rerun-failed option
Add a new command line argument to ctest.  This allows users to
rerun tests that failed during the previous call to ctest.  This
is accomplished by analyzing the most recently modified file named
"^LastTestsFailed*" in the Testing/Temporary subdirectory of the
project's binary directory.
2013-10-08 09:18:13 -04:00
Stephen Kelly 33055c405e Generate modern-style cmake code.
The commits 9db31162 (Remove CMake-language block-end command
arguments, 2012-08-13) and 77543bde (Convert CMake-language
commands to lower case, 2012-08-13) changed most cmake code
to use lowercase commands and no parameters in termination
commands. However, those changes excluded cmake code generated
in c++ by cmake.

Make a similar style change to code generated by cmake.
2013-08-22 12:06:58 +02: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 c0756b6dd6 Revert "CTest: fix pre and post test commands with spaces" (#13887)
This reverts commit 6187876dea.

It was actually possible before to have paths with spaces in them, the spaces
just need to be quoted. This way spaces will work as argument separators.
2013-07-27 22:05:47 +02:00
Brad King a052a79949 Merge topic 'CTest-less-cd'
9969bfb CTest: avoid useless changing of directory
2013-05-16 14:43:44 -04:00
Rolf Eike Beer 9969bfb773 CTest: avoid useless changing of directory
At this point we do not care what the current directory is, as nothing that
requires a specific directory is done. Just make sure that at the end we are
back in the same directory as at the start.
2013-05-15 08:50:22 +02:00
Andreas Mohr bf019d765d Fix spelling and typos (non-binary) 2013-05-07 08:39:19 -04:00
Stephen Kelly ddc052052b Always use the auto_ptr from cmsys.
This is for consistency throughout cmake. The cmsys version exists
becaues uses of auto_ptr types as return types does not work with
some implementations in ancient compilers.
2012-11-21 00:56:36 +01:00
Rolf Eike Beer 6187876dea CTest: fix pre and post test commands with spaces
If the pre or post memcheck or test commands have spaces in the path these
were never escaped, leading to broken commands. This was not covered in the
test suite so it went unnoticed.
2012-10-01 17:39:09 +02:00
Yury G. Kudryashov 737c49a357 Add 'const' qualifier to some cmCommand members
Use const_cast for the special case in cmFindBase where
GetFullDocumentation calls GenerateDocumentation.
2012-02-29 13:27:04 -05:00
David Cole 4575ed9e2a Fix line too long style violation 2011-08-03 11:37:59 -04:00
David Cole ba4886b717 CTest: print failed tests in index order (#11746)
This deterministic ordering makes it easier for a developer
comparing the ctest output of two test runs to see what changed
from run to run.

Thanks to Fraser Hutchison for the patch.
2011-08-03 10:48:43 -04:00
Johan Björk 856a9e499f RunSingleCommand: Replace verbose boolean with enum
No behaviour change, this prepares for adding a flag to skip the merging
of output streams.
2011-07-28 10:42:03 -04:00
Brad King a4ec24269b CTest: Report tests not run due to unknown configuration
When add_test(NAME) is called without the CONFIGURATIONS argument then
the test is intended to run in any configuration.  In multi-config
generators like the VS IDE and Xcode tests created by add_test(NAME) can
only be run when testing a known configuration (otherwise there is no
way to generate the test command line).  If no test command line is
known for a particular configuration, or if no configuration is given to
ctest, report the test as not run instead of silently skipping it.

Also fix CMake's own TestsWorkingDirectory test invocation to correct a
previously silent failure exposed by this change.
2011-06-10 09:52:18 -04:00
Bill Hoffman dd52fc309d Fix a memory leak. 2011-06-06 16:41:17 -04:00
Zach Mullen 350546db3a Implement ctest_upload command 2011-03-15 15:07:37 -04:00
Brad King a1711f1c6b Remove trailing whitespace 2011-03-11 08:04:58 -05:00
Brad King 333e707d95 Merge topic 'fix-test-output-truncation'
e73bf1c CTest: Do not truncate UTF-8 test output too early (#10656)
2011-01-11 15:49:04 -05:00
Brad King e73bf1c384 CTest: Do not truncate UTF-8 test output too early (#10656)
Since commit e4beefeb (CTest: Do not munge UTF-8 output in XML files,
2009-12-08) we validate UTF-8 encoding of build and test output as it is
written to XML files.  However, in cmCTestTestHandler::CleanTestOutput
we still processed test output one byte at a time and did not recognize
multi-byte UTF-8 characters.  Presence of such characters caused early
truncation.

Teach CleanTestOutput to truncate test output at the limit but without
cutting it in the middle of a multi-byte encoding.  Also, stop avoiding
truncation in the middle of an XML tag like "<MyElement>" because the
'<' and '>' will be properly escaped in the generated XML anyway.
2011-01-04 13:20:49 -05:00
Zach Mullen 51bb493574 Test TIMEOUT property explicitly set to zero should be honored 2011-01-03 14:41:25 -05:00
Brad King 97c5171d6c Merge topic 'dev/add_test-working-directory'
667a90a Fix sentence break in add_test documentation
96309fc Make TestsWorkingDirectory test a C file
a4a5e37 Use iostream to make Borland happy
cfe53cd Fully specify the path to old-signature add_test
017d4e9 Group adding tests with its properties
561cc33 Only test the default cwd with Makefiles
d87bae7 Simplify the _default_cwd derivation
992c74f Use --><-- markers to denote the path
5249551 Flip slashes around on Windows
0a014da Add ctype.h include for toupper()
af12f83 Fix header includes for C++ and Visual Studio
5597aa2 Rename the project to match the test
9bf4165 Add tests for WORKING_DIRECTORY arg to add_test
42de5d0 Add WORKING_DIRECTORY argument to add_test
7679f9f Rename WorkingDirectory test
d95f817 Add the WORKING_DIRECTORY property to tests
2010-12-28 15:25:49 -05:00
Clinton Stimpson 744366fc0b CTest: multiple ctest_test calls w/LABEL regexs (#11487)
The Initialize method was not re-initializing everything
that it should have been. This commit fixes that.
2010-12-17 17:30:13 -05:00
Rolf Eike Beer d95f817f77 Add the WORKING_DIRECTORY property to tests 2010-12-16 16:23:18 -05:00
Zach Mullen 32242affea Added CTest command --print-labels
This command allows a user to quickly see the list of all available
test labels.  The labels are also printed in verbose show only mode,
alongside their corresponding tests.
2010-08-31 10:41:23 -04:00
David Cole 415900ba77 Eliminate -Wconversion warnings.
Change types of local variables, or casting, or re-arrange
expressions to get rid of "conversion may alter value" warnings
as seen on recent dashboard submissions from londinium.kitware.
2010-06-27 11:22:05 -04:00
Zach Mullen 960dc2b10f Do not exit if stoptime is passed. 2010-06-15 10:29:35 -04:00
Zach Mullen 767ffba8ff Added RESOURCE_LOCK test property. 2010-03-02 15:38:02 -05:00
Zach Mullen b4d27dc041 Use historical average of test times to schedule tests. 2010-02-26 11:02:05 -05:00
Zach Mullen ff916b48bd CTest output submitted to the dashboard is now compressed by default. 2009-12-17 11:14:49 -05:00
Zach Mullen 9add940eb6 Added an option to conditionally attach files to a test submission only if the test does not pass. Also some preliminary changes for test output compression. 2009-12-16 14:50:16 -05:00
Zach Mullen 5bfe1a1962 Changed XML formatting of files attached to test so that each file is archived and marked up individually, in order to make things easier on the CDash side. Also switched to using the NamedMeasurement tag instead of a new tag. 2009-12-15 14:24:24 -05:00
Zach Mullen dc66139f7c CTest-side changes to allow users to attach arbitrary files to test results that will be submitted to cdash using the ATTACHED_FILES test property. 2009-12-15 12:07:15 -05:00
Zach Mullen 4de7cc3621 Unfortunately, I noticed the comment on bug 8668 too late. This changes my last implementation of the exe wrapper to something which makes much more sense: a REQUIRED_FILES property on tests. 2009-12-10 15:37:04 -05:00
Zach Mullen 48b6133928 [0008668: CTest Dev: Missing executables shown as failed tests when using MPI.] Added a wrapping option to add_test so that exes built by the project can be safely wrapped in other exes and be listed as "not run" rather than "failed" if they are not built. 2009-12-10 14:38:32 -05:00
Zach Mullen c32088cfee Local test timeouts will now always take precedence over the global --timeout option. 2009-12-08 10:26:43 -05:00
Zach Mullen b30f627190 CMake global timeout (--timeout option) should prevail over individual test timeouts if it is lower than the individual timeout. 2009-12-07 13:25:54 -05:00
Bill Hoffman 22c37b2b19 Hanle the case where a test can not be run because it is a bad executable. 2009-12-02 16:37:43 -05:00
Zach Mullen a52c0118d4 Added the --timeout option to ctest command line. This sets a global timeout on all tests if no more specific timeout is set on them. 2009-11-30 16:08:11 -05:00
Zach Mullen c9c0ee4056 Change logic of ctest subdirs command to allow for absolute paths. Also added test coverage for passing absolute paths to subdirs. 2009-11-10 10:40:24 -05:00
Zach Mullen 17afd5257b Bug 9090: CTest does not handle absolute paths in CTestTestfile SUBDIR( ) entries.
The ctest subdirs command now checks the relative path first, and if that does not exist, also checks if the given path was absolute.  Thanks vodall for the patch.
2009-11-09 14:07:36 -05:00
Zach Mullen 8612aa10b6 Hook for scheduling tests in a random order
This may help statistically detect implicit dependencies among unit
tests while running in parallel.
2009-10-29 15:30:12 -04:00
Zach Mullen 7fd3d7cf80 BUG: #0009648 Change "The following tests FAILED" message to print on stdout rather than stderr 2009-10-05 12:47:09 -04:00