Commit Graph

154 Commits

Author SHA1 Message Date
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 6c19024570 Remove extra semicolons from C++ code.
Clang based tools running over the code complain about these,
but clang has a fixit for removing them.
2014-04-03 21:53:14 +02: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
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
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
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 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 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
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
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 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 4b32ee01f2 Better detection of stop_time being passed. 2010-03-19 09:09:02 -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 0a0788a72d Enhanced CTest HTTP Request API to support PUT file uploads. 2009-12-30 11:10:42 -05:00
David Cole aad15c3abf Fix issue #10060 - add APPEND arg to ctest_start command.
If APPEND is given to ctest_start, it will read the tag from the current existing Testing/TAG file rather than creating a new one based on the current time stamp. This allows a developer to run several dashboard scripts in a row, all of which will share the same tag/stamp/buildid when they finally get submitted to CDash. Now you can split the running of build phases and test phases for the same dashboard row into multiple scripts.
2009-12-29 14:38:31 -05:00
Zach Mullen 3cb2a0ffa6 Move cURL dependent code out of CMakeLib to fix complex tests. 2009-12-22 14:37:06 -05:00
Zach Mullen a302b51db5 Query the CDash web API to automate CDash version detection. 2009-12-21 15:47:29 -05:00
Zach Mullen 7af553188e Added support for CTest awareness of the CDash version. This will help forward compatibility for both tools. Note that this changeset effectively makes the default to disable output compression. Now, to enable output compression, the CDASH_CTEST_VERSION must be explicity set to >= 1.6. Automated detection of the CDash version is the next step. 2009-12-21 12:27:04 -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 b2e7da885d Added a "-http1.0" option to ctest to make it submit using curl's http 1.0 option. Also added parsing of html reponse output to determine whether errors or warnings were sent in response from the server. If errors or warnings occurred, the response is output to stdout, and the "submission successful" message has been changed to accurately reflect whether or not warnings or errors were returned with the response. 2009-12-11 14:10:37 -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
Brad King e1548142fb CTest: Move initial checkout to ctest_start()
In CTest command-driven script mode we support starting without a source
tree.  Previously the ctest_start() command would do some initialization
but could not do anything that required CTestConfig.cmake from the input
source tree.  Later, ctest_update() would run CTEST_CHECKOUT_COMMAND to
create the source tree, and then re-initialize everything.  This
delayed-initialization approach led to many complicated cases of which
only some worked.  For example, the second initialization only worked
correctly in Nightly mode and simply failed for Experimental and
Continuous builds.

A simpler solution is to run CTEST_CHECKOUT_COMMAND during ctest_start()
and then have a single initialization path.  In principle this change in
behavior could break scripts that set the checkout command after
ctest_start() but before ctest_update().  However, the convention we've
always followed has been to set all variables before ctest_start().

See issue #9450.
2009-11-24 08:58:59 -05:00
Brad King c2ba35787e CTest: Simplify Initialize method signature
We make the cmCTest::Initialize method private since it is only called
from inside the class implementation.  We also combine the two boolean
arguments into one since they both meant the same thing.
2009-11-24 08:58:48 -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
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
Bill Hoffman 8a690289c2 Add label summary times to ctest default output. Also, remove parallel time output. Add flag to disable label summary. 2009-09-11 13:34:35 -04:00
Zach Mullen 69fd641adb Fixed ctest output where max test index is not the same width as the total number of tests. Also some preliminary changes for batching ctest jobs 2009-09-02 10:08:40 -04:00
Zach Mullen 177edc5ed1 Fixed ctest -N segfault issue. Further refactored ctest. Enabled failover for ctest 2009-08-27 10:37:30 -04:00
Zach Mullen 8ffd8d0a03 ENH: refactored ctest. All testing is now parallel. If no -j option is specified, defaults to a MP level of 1 (non parallel) 2009-08-26 12:09:06 -04:00
Zach Mullen b9daa192af ENH: Refactored CTest test execution code into an object 2009-08-19 08:58:36 -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 3f4064f7ac ENH: Add cmCTest::DecodeURL method
This new method decodes the "percent-encoding" used in URL syntax.
2009-02-24 15:43:06 -05:00
Brad King dc69ed8e99 STYLE: Add TODO comment about CTest configuration
Currently CTest does not load configuration settings computed at CMake
Configure time when running a dashboard script.  This adds a comment
describing refactoring that might help resolve the problem.
2009-02-13 11:49:26 -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
Brad King 5527ca5524 BUG: Reset file submission list on test restart
When running in script mode it is possible to run multiple separate
dashboard submissions in one cmCTest instance.  The recent refactoring
of file submission lists into parts failed to clear the submission lists
when starting a new dashboard (ctest_start or ctest_update).  Only the
unused old submission set was cleared.  This fixes the refactored
version to remove the old submission set completely and also clear the
part-wise lists.
2009-01-27 10:58:33 -05:00
Bill Hoffman 7e1ba9d075 BUG: add output on failure to ctest #8255 2009-01-18 13:03:32 -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 4b97fab34d ENH: Refactor cmCTest test part representation
This introduces the name "part" to denote a portion of the testing and
submission process performed by ctest.  We generalize the boolean
indicating whether each part is enabled into a structure to which more
information can be added later.  We provide bi-directional mapping
between part id and part names.
2009-01-12 10:37:25 -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 5d5fd641c3 ENH: fix return type 2009-01-09 12:32:52 -05:00
Bill Hoffman ed387ffe6b ENH: add subproject tag property for ctest 2009-01-09 12:05:23 -05:00
Brad King 2703d51b8f BUG: Capture cout and cerr from internal ctest
When CTest detects that a test is running its own executable it
optimizes the test by using an internal instance of cmCTest instead of
creating a new process.  However, the internal instance was using cout
and cerr directly.  This redirects the output to a string stream to
avoid direct display of the internal test's output.
2009-01-05 14:14:10 -05:00