MantisBT - CMake
View Issue Details
0013024CMakeCTestpublic2012-03-07 10:222013-03-04 08:38
Nils Gladitz 
Brad King 
normalmajoralways
closedfixed 
CMake 2.8.7 
CMake 2.8.10CMake 2.8.10 
0013024: some ctest svn calls may hang waiting for user input
The certificate (https) on our svn server was replaced and no longer trusted on some of the cdash build clients resulting in ctest svn calls asking for user input.

The call to "svn update" passes "--non-interactive" maybe this should be passed to all svn commands issued by ctest.

The specific command that was hanging for me was "svn log --xml [...]".

If possible I'd also like to optionally add --trust-server-cert to all svn invocations.
No tags attached.
related to 0012304closed Brad King FindSubversion.cmake macro Subversion_WC_LOG hangs if credentials are not set. 
patch 0001-ctest-without-interactive-svn.patch (7,140) 2012-09-23 13:59
https://public.kitware.com/Bug/file/4497/0001-ctest-without-interactive-svn.patch
Issue History
2012-03-07 10:22Nils GladitzNew Issue
2012-03-07 10:53Brad KingRelationship addedrelated to 0012304
2012-03-07 10:54Brad KingNote Added: 0028855
2012-03-07 11:00Brad KingNote Added: 0028856
2012-03-07 11:07Brad KingNote Added: 0028857
2012-03-07 11:07Brad KingStatusnew => backlog
2012-03-07 11:08Brad KingNote Added: 0028858
2012-09-23 13:59Nils GladitzFile Added: 0001-ctest-without-interactive-svn.patch
2012-09-23 14:02Nils GladitzNote Added: 0031089
2012-09-24 09:08Brad KingNote Added: 0031091
2012-09-24 09:08Brad KingAssigned To => Brad King
2012-09-24 09:08Brad KingStatusbacklog => resolved
2012-09-24 09:08Brad KingResolutionopen => fixed
2012-09-24 09:08Brad KingFixed in Version => CMake 2.8.10
2012-09-24 09:08Brad KingTarget Version => CMake 2.8.10
2012-09-24 10:26David ColeNote Added: 0031093
2012-09-24 11:31Brad KingNote Added: 0031095
2012-09-25 13:38Brad KingNote Added: 0031102
2013-03-04 08:38Robert MaynardNote Added: 0032459
2013-03-04 08:38Robert MaynardStatusresolved => closed

Notes
(0028855)
Brad King   
2012-03-07 10:54   
Some cases of this were fixed in CMake 2.8.5 by:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a5a402a [^]

and other cases in CMake 2.8.6 by:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c6e8524 [^]
(0028856)
Brad King   
2012-03-07 11:00   
I think --trust-server-cert was introduced in Subversion 1.6:

  http://subversion.apache.org/docs/release-notes/1.6.html#cmdline [^]

but if support were added it would be optional anyway.
(0028857)
Brad King   
2012-03-07 11:07   
If anyone has time to work on a patch for this look in

  Source/CTest/cmCTestSVN.cxx

for all the blocks of code that start with

  const char* svn = this->CommandLineTool.c_str();

Convert the local argument arrays to std::vector as is done for some other invocations. Then always add --non-interactive and optionally add --trust-server-cert.

As far as how to make the trust optional, look at

  Source/CTest/cmCTestUpdateCommand.cxx

to set ctest config option SVNOptions in addition to SVNUpdateOptions. Then look for that in cmCTestSVN methods using this->CTest->GetCTestConfiguration(...).
(0028858)
Brad King   
2012-03-07 11:08   
Meanwhile, this is probably possible to work around on platforms supporting shell scripts by wrapping svn up in a script such as:

 #!/usr/bin/env bash
 exec svn --non-interactive --trust-server-cert "$@"
(0031089)
Nils Gladitz   
2012-09-23 14:02   
I've attached a patch which I hope fixes this issue.
Thanks for the detailed instructions!
(0031091)
Brad King   
2012-09-24 09:08   
Re 0013024:0031089: Thanks! Applied with minor style tweaks:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aeb13c1d [^]
(0031093)
David Cole   
2012-09-24 10:26   
Don't we also need:
SVNOptions: @CTEST_SVN_OPTIONS@

in DartConfiguration.tcl.in?

For this change to be complete, and to work with "ctest -D Experimental" I think this mapping needs to be in that file, too.
(0031095)
Brad King   
2012-09-24 11:31   
Re 0013024:0031093: Yes, thanks. I squashed that in:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c70ed0c [^]
(0031102)
Brad King   
2012-09-25 13:38   
Our nightly builds failed on VS 6 with error

 Source\CTest\cmCTestSVN.cxx(319) : error C2039: 'size_t' : is not a member of 'std'

I squashed in a fix to switch to iterators to traverse the vector:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ace8015 [^]
(0032459)
Robert Maynard   
2013-03-04 08:38   
Closing resolved issues that have not been updated in more than 4 months.