Storing credentials on the machine in advance is one way to achieve this.<br><br><div>(I have not tried this myself, but...) You may also be able to set the CTEST_UPDATE_COMMAND to a script that delegates to svn with all your desired command line options.</div>
<div><br></div><div>The output of the script must be svn output -- ctest parses the output directly to detect modified files.</div><div><br></div><div>The upating commands of ctest were re-factored in the relatively recent past to enable git, hg and bzr updates. You may need different techniques with different versions of ctest.</div>
<div><br></div><div>The best way to approach this is probably to look at the ctest source code and figure out exactly what it's doing in your case, and why it doesn't work. Certainly, what you're trying to do is reasonable. Although one could argue it might be better to cache credentials on machines than save them in plain text in a script file.....</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br></div><div><br><div class="gmail_quote">On Fri, Jan 28, 2011 at 3:15 AM, girish hilage <span dir="ltr"><<a href="mailto:girish_hilage@yahoo.com">girish_hilage@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit"><div>Yes. I tried giving OPTIONS directly with CTEST_UPDATE_COMMAND but it says "Update command failed".<br>
<br>If I execute "svn update --username <my_svn_username> --password <my_svn_password> --non-interactive" from a simple <span>shell script</span> (.sh file),<br><br>then it works fine without prompting for a password.<br>
<br>Does that mean 'svn update' with svn credentials do not work as expected in the ctest script?<br>Is, first storing the SVN credentials on a machine executing the cronjob, the only solution? </div>
<div> </div>
<div>Regards,</div>
<div>Girish<br><br>--- On <b>Thu, 1/27/11, Tyler Roscoe <i><<a href="mailto:tyler@cryptio.net" target="_blank">tyler@cryptio.net</a>></i></b> wrote:<br></div>
<blockquote style="padding-left:5px;margin-left:5px;border-left:rgb(16,16,255) 2px solid"><br>From: Tyler Roscoe <<a href="mailto:tyler@cryptio.net" target="_blank">tyler@cryptio.net</a>><br>Subject: Re: [CMake] using svn credentials inside ctest script<br>
To: "girish hilage" <<a href="mailto:girish_hilage@yahoo.com" target="_blank">girish_hilage@yahoo.com</a>><br>Cc: <a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a><br>Date: Thursday, January 27, 2011, 4:42 PM<div>
<div></div><div class="h5"><br><br>
<div>On Thu, Jan 27, 2011 at 08:40:14AM -0800, Tyler Roscoe wrote:<br>> On Thu, Jan 27, 2011 at 04:11:35AM -0800, girish hilage wrote:<br>> > find_program(CTEST_SVN_COMMAND NAMES svn)<br>> > set(CTEST_UPDATE_COMMAND "${CTEST_SVN_COMMAND}")<br>
> > set(CTEST_UPDATE_OPTIONS "--username <my_svn_username> --password <my_svn_password>")<br>> > <br>> > ctest_update(RETURN_VALUE updateRV)<br>> > <br>> > But, when I give 'ctest -S script.cmake', it again asks for the svn password eventhough I have hard-coded svn username and password in script.cmake.<br>
> > My requirement is that, I am setting up a cronjob for nightly builds and I do not want it to ask for an svn password.<br>> > <br>> > In the output I can see following lines :<br>> >
SetCTestConfigurationFromCMakeVariable:UpdateCommand:CTEST_UPDATE_COMMANDSetCTestConfiguration:UpdateCommand:/usr/bin/svn<br>> > SetCTestConfigurationFromCMakeVariable:UpdateOptions:CTEST_UPDATE_OPTIONSSetCTestConfiguration:UpdateOptions:--username <my_svn_username> --password <my_svn_password><br>
> > SetCTestConfigurationFromCMakeVariable:SVNCommand:CTEST_SVN_COMMANDSetCTestConfiguration:SVNCommand:/usr/bin/svn<br>> <br>> Your code looks reasonable to me. Have you tried sticking the OPTIONS<br>> directly into CTEST_UPDATE_COMMAND?<br>
> <br>> You could also let Subversion handle the username/password; it will<br>> cache them if ask it to. The advantage is that you don't have to<br>> hardcode passwords into your build scripts. The disadvantage is this is<br>
> something you'll need to take care of for all machines/accounts that do<br>> automated builds.<br><br>One other thing that I had to discover myself
and which I haven't<br>noticed in any CTest documentation:<br><br># 'update' and '--non-interactive' are automatically added to<br># CTEST_UPDATE_COMMAND by CTest.<br><br>So maybe --non-interactive is interfering with --username/--password? It<br>
shouldn't but it's another thing to test.<br><br>tyler<br></div></div></div></blockquote></td></tr></tbody></table><br>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>