MantisBT - CMake
View Issue Details
0011792CMakeCTestpublic2011-02-03 05:162012-04-02 10:10
Rolf Eike Beer 
David Cole 
normalminoralways
closedfixed 
CMake-2-8 
CMake 2.8.7CMake 2.8.7 
0011792: Improve handling of CTEST_SITE
If CTEST_SITE contains an entry with newline (e.g. when using the "hostname" command without OUTPUT_STRIP_TRAILING_WHITESPACE) then the submission to CDash would show up as two entries.

If CTEST_SITE isn't set at all every step of the submission shows up as it's own entry, of course all of them without hostname set.

I propose the following:
-the value passed in CTEST_SITE should be checked if it is valid (i.e. no whitespace, newlines, controls)
-if CTEST_SITE is not set the hostname (or FQDN) of the current host should be inserted. If the behaviour here would be selectable this would be of great help.

E.g. I would put SET(CTEST_SITE_DEFAULT_FQDN OFF) in my companies CTest scripts as I don't need the domain stuff there. For public projects (CMake and KDE would come to mind) this could be set to ON so the FQDN of the hosts would show up in CDash.

If CDash could reject submissions of older clients with a speaking error message this would be extremely useful so broken submissions can be stopped at both sides.
No tags attached.
related to 0012585resolved Julien Jomier CDash Use "(empty)" instead of "" when site and build names come in empty from ctest 
Issue History
2011-02-03 05:16Rolf Eike BeerNew Issue
2011-08-01 11:04David ColeNote Added: 0027138
2011-08-01 11:05David ColeAssigned To => David Cole
2011-08-01 11:05David ColeStatusnew => assigned
2011-08-01 11:05David ColeTarget Version => CMake 2.8.6
2011-09-06 22:53David ColeNote Added: 0027389
2011-09-06 22:53David ColeNote Added: 0027390
2011-09-06 22:53David ColeTarget VersionCMake 2.8.6 =>
2011-09-08 02:03Rolf Eike BeerNote Added: 0027393
2011-10-28 12:25David ColeTarget Version => CMake 2.8.7
2011-11-18 17:23David ColeNote Added: 0027829
2011-11-18 17:23David ColeStatusassigned => resolved
2011-11-18 17:23David ColeFixed in Version => CMake 2.8.7
2011-11-18 17:23David ColeResolutionopen => fixed
2011-11-18 17:24David ColeRelationship addedrelated to 0012585
2012-04-02 10:10David ColeNote Added: 0029047
2012-04-02 10:10David ColeStatusresolved => closed

Notes
(0027138)
David Cole   
2011-08-01 11:04   
I think the *CDash* code should handle "poorly formed" site names in a better way:

For example, if newlines or control characters are used in the site name, we could construct a new name (first 8 chars of the md5 sum of the input name...) and then append the reasonable part of the input name, too.

And for an empty string input, we could just use "unknown" or "empty".

I'll put this one the roadmap for 2.8.6, but it's going to be the lowest priority bug on there since there is a completely reasonable work-around to this issue: set CTEST_SITE properly in your scripts, of course.

I think it's reasonable to ask ctest to construct a name based on the site_name command's output. Any customization beyond that is achievable simply by setting CTEST_SITE correctly in your script, so I don't see why the complications should be added into ctest.
(0027389)
David Cole   
2011-09-06 22:53   
After include(CTest) in your main CMakeLists.txt file, I don't see how this could happen unless you have a mistake in a script where you are over-riding the value of CTEST_SITE.

How are empty and newline-filled CTEST_SITE values being generated in the first place?

Is there a simple project where you can demonstrate this problem? (If so, please attach...)

Even in the very simplest dashboard-enabled CMake/Tests/Tutorial/Step7, the include(CTest) line takes care of using site_name to define the SITE variable, which is what shows up by default in CDash.

I tried deleting the SITE out of my CMakeCache for CMake and Tutorial Step7, but they just come back again after the next configure with the default name of my computer.
(0027390)
David Cole   
2011-09-06 22:53   
Not enough time left to address this issue before the 2.8.6 release. Deferred until a future release.
(0027393)
Rolf Eike Beer   
2011-09-08 02:03   
The CMake Nightly ctest script will do, the one from http://opensource.sf-tec.de/repos/Qsmtp/trunk/ctest_qsmtp.cmake [^] would also work.
(0027829)
David Cole   
2011-11-18 17:23   
Fix pushed to 'next':

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92af1dad0652951e8f7adc1a4a59527bd98435fa [^]
(0029047)
David Cole   
2012-04-02 10:10   
Closing resolved issues that have not been updated in more than 4 months.