Commit Graph

440 Commits

Author SHA1 Message Date
Bill Hoffman 653529ce55 CTest: Allow / to be in the build name, and be consistent with the build name
Prior to this change / was not allowed in the build name. This was tested
with a CDash server and worked. In addition the safe build name was not
used everywhere. This caused mismatched build names to be in the xml
files going to CDash which caused different rows to be created for the
same build.
2014-08-18 11:22:18 -04:00
Bill Hoffman 7762fffa23 Change output to be a reference and not a pointer.
This avoids having to check the pointer value at each use which
was not being done.
2014-08-04 15:16:40 -04:00
Stephen Kelly ff710539ab Remove default labels from fully covered switch statements.
Allow compilers to warn when new enum values are added, making
switches no-longer fully-covered.
2014-04-03 21:53:13 +02:00
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 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
Ben Boeckel 83a5e453f8 stringapi: Use strings for test names 2014-03-08 13:05:30 -05:00
Ben Boeckel 3742bb0d32 stringapi: Use strings for variable names
Variable names are always generated by CMake and should never be NULL.
2014-03-08 13:05:28 -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
Stephen Kelly 4fe963f656 Use new cmHasLiteralPrefix function 2013-11-21 20:53:15 +01:00
Brad King d1526f825e Refactor internal resource location APIs and initialization
Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources.
Teach it to compute the locations of cmake, ctest, cpack, ccmake, and
cmake-gui executables, and the location of CMAKE_ROOT.  Provide this
information from static cmSystemTools::Get<resource>() methods.
Refactor code that needs these locations to use the new APIs.

Teach FindCMakeResources to use the OS X system API to lookup the
executable location.  When running from the CMake build tree itself,
leave a file in the tree that FindCMakeResources can use to read the
location of the source tree.  This avoids the need to compile the source
tree location into a binary that may be installed and used without the
source tree.

Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build
tree next to "cmake" and the other tools, as is already done in the
install tree for the application bundle.  This ensures a consistent set
of executables are available in one directory.
2013-11-12 08:23:35 -05:00
Adrien Destugues 54ef2bea37 Haiku: Include files cleanup in cmCTest
* No need to use a different path from the BeOS one, which still works.

Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-08 09:56:16 -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
Sean McBride 1399825cf9 Remove some uses of obsolete 'register' storage specifier
Remove the keyword from all Source/* files outside of KWSys.
2013-06-28 16:37:49 -04:00
Stephen Kelly db43502326 CTest: Read CTEST_PARALLEL_LEVEL from environment
If no explicit "-j <n>" option is given on the command line then read
the parallel level from an environment variable.
2013-05-21 15:27:09 -04:00
Andreas Mohr ddac8d3d2d Fix spelling and typos (affecting binary data / module messages) 2013-05-07 08:39:19 -04:00
Rolf Eike Beer 7a1b961de8 Haiku no longer defines __BEOS__ 2013-01-07 21:20:11 +01:00
Brad King da6b0ffe5d Merge topic 'ctest-SUBMIT_INDEX-cdash'
1cfaa2f CTest: Allow SUBMIT_INDEX with CDash
2012-11-06 14:14:13 -05:00
Brad King 1cfaa2f1a0 CTest: Allow SUBMIT_INDEX with CDash
If CTEST_DROP_SITE_CDASH is true then SUBMIT_INDEX is supported.
The Dart version does not matter because the server is not Dart.
2012-11-01 17:03:20 -04: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 c77b57ba7d CTest: Allow -Dvar=value with no space between the D and the var
Similar to CMake's handling of -D command line arguments, for
consistency and to avoid silent ignoring of "unknown command
line" args.
2012-06-24 08:14:11 -04:00
David Cole 93d084c180 CTest: Extend -D command line arg handling for variable definitions
If the argument following -D is not a valid dashboard type string,
then try to parse it as a "var:type=value" string just like cmake
already does.
2012-06-24 08:03:24 -04:00
David Cole af298480d0 CTest: Rename local variable for clarity 2012-06-24 05:51:08 -04:00
David Cole 24ba0fd078 CTest: Refactor error output into ErrorMessageUnknownDashDValue
No behavior change. Prep work for defining script variables by
extending -D command line handling to recognize var:type=value syntax.
2012-06-24 05:46:55 -04:00
Brad King b10c5cbb87 CTest: Simplify environment save/restore
Replace use of AppendEnv/RestoreEnv pairs with instances of
SaveRestoreEnvironment.  Simplify the signature of AppendEnv and use it
in place of similar loops elsewhere.  Move the RestoreEnv implementation
inside the SaveRestoreEnvironment destructor which is the only place
left that calls it.
2012-04-24 16:56:14 -04:00
Valat Sébastien 52f937aea8 CTest: Do not get CDash version without drop site (#12618)
Avoid sleep for 3 seconds in ctest if CDashDropSite is empty.
2011-12-12 09:35:09 -05:00
David Cole 92af1dad06 CTest: Disallow problem chars in build and site names (#11792)
Also, use "(empty)" rather than actually sending an empty string
if build or site name is not set properly.
2011-11-18 17:13:07 -05:00
David Cole c2300e6265 Merge topic 'fix-12539-ctestconfig-from-build-dir'
76ecdd8 CTest: Look for CTestConfig.cmake in build dir first, then source dir
2011-11-01 14:26:21 -04:00
David Cole e0d97b6728 Merge topic 'fix-12383-clear-ctest-vecs'
499c104 CTest: Clear custom vectors before populating (#12383)
2011-11-01 14:26:16 -04:00
Jean-Christophe Fillion-Robin 76ecdd8d16 CTest: Look for CTestConfig.cmake in build dir first, then source dir
Provide the ability to configure CTest with settings different from the ones
available in the source tree by checking first if CTestConfig.cmake
exists in the build tree.

The motivation is to allow build system checking out external project to
test and/or package them and submit the associated results to a different
dashboard than the one specified (or not) in the source of the external
project.

For example, the build system of Slicer can checkout, build, test
and package what I will  call "extensions". These extensions can be developed
by third parties who can test and submit to their own dashboard / project.
When checked out by Slicer build system, the default dashboard can now be
overwritten by adding a custom CTestConfig.cmake to the build directory.
And if not overwritten, it would avoid to create CTestConfig.cmake within
the source checkout of the extension.
2011-10-26 23:23:03 -04:00
David Cole 499c104572 CTest: Clear custom vectors before populating (#12383)
Important when calling ctest commands in a loop from a script.
Each time Populate gets called, it uses the current definition
of the variable. Without the clear, it was accumulating additional
identical values each time through the loop.
2011-10-26 00:19:46 -04:00
Bernhard Walle 26b6794fd5 Source/cmCTest.cxx: Add missing newline (#12538)
In the log entry, the newline is missing. The output without the newline
character is a bit strange, like

 SetCTestConfigurationFromCMakeVariable:MemoryCheckCommand:CTEST_MEMORYCHECK_COMMANDSetCTestConfiguration:MemoryCheckCommand:/usr/bin/valgrind

Instead of

 SetCTestConfigurationFromCMakeVariable:MemoryCheckCommand:CTEST_MEMORYCHECK_COMMAND
 SetCTestConfiguration:MemoryCheckCommand:/usr/bin/valgrind

This patch changes this to add a newline.

Signed-off-by: Bernhard Walle <walle@corscience.de>
2011-10-25 08:34:42 -04:00
Thomas Jarosch f47393c66b CTest: Fix memory leaks on error
Credit goes to "cppcheck".

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
2011-09-02 11:15:11 -04:00
Zach Mullen 0e591ed4c2 Fix type conversion warning 2011-05-27 10:45:41 -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
Zach Mullen 28cdd0a5be Don't tar/gz ctest_upload() files 2011-03-15 15:07:37 -04:00
Zach Mullen 350546db3a Implement ctest_upload command 2011-03-15 15:07:37 -04:00
Zach Mullen ffda17d9ef We shouldn't ask CDash for its version info until/unless we actually need it. 2010-09-08 15:14:42 -04: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
Zach Mullen 7dbc1a2ebd Fix hard-coded CDash URI in version query 2010-08-18 09:58:27 -04:00
Brad King e1a4c02bac Merge topic 'resolve/doc-spelling/CPackRPM'
7739d78 Merge CPackRPM changes into doc-spelling
9203e91 Fix spelling errors reported by Lintian.
2010-07-20 16:00:29 -04: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
Brad King ff1f8d0b53 Fix or cast more integer conversions in cmake
These were revealed by GCC's -Wconversion option.  Fix types where it is
easy to do so.  Cast in cases we know the integer will not be truncated.
2010-06-29 09:52:12 -04:00
Zach Mullen 4b32ee01f2 Better detection of stop_time being passed. 2010-03-19 09:09:02 -04:00
Zach Mullen 9eea95c90f Fix StopTime to also account for localtime being a day ahead of gmtime 2010-03-18 14:48:42 -04:00
Zach Mullen 9676c52c3e Fix for StopTime for cases when gmtime is a day ahead of localtime 2010-03-18 13:53:40 -04:00
Zach Mullen 0ba9d04117 Add the --stop-time argument
Unit test and script hook for STOP_TIME
2010-03-17 11:04:13 -04:00
Zach Mullen 09e748c69a Configurable path to CTest cost data file
Allow the user to set the CMake variable CTEST_COST_DATA_FILE, which will be used to store the cost data from test runs.  If not set, defaults to the original location in the build tree Testing/Temporary dir.
2010-03-01 11:06:28 -05:00
Zach Mullen 41fcf6e155 Moved call to cache CDash version information to cmCTest::initialize. Also added a 3 second timeout when requesting the version from the server. Added an option to the CTestConfiguration that will be used to determine whether to query the version information at all. (Behavior for this setting is not yet defined.) Updated CMake's local CDash version setting to 1.6. 2010-02-08 09:47:39 -05:00
Bill Hoffman 46ff4bbd0a Fix HPUX issue with test, by doing the query to cdash for its version before any test is started. 2010-02-04 19:00:20 -05:00