I run sudo svn --username radek update ".$codebase." --force"; from my php script (on SuSE) every night before automation testing starts. So the testing is done on the latest code that was checked in today.
How can I for sure know that svn up finished successfully? So in case it wasn't the testing is not triggered?
From the command line, I usually run svn status -q which should print nothing if everything is up to date. Otherwise, it will either error out, or display what files haven't been updated yet.
As others have mentioned, svn up should return a non-zero value if it failed for any particular reason.
You should look into using a continuous build system like Jenkins. You could have Jenkins run your tests with every commit, or automatically have it run at a particular time during the day. This way, you're not reinventing the wheel. Plus, Jenkins could email the test results and give you a place to display them.
svn up for free. You can run a shell script or a command line from Jenkins, so as long as your Rational scripts are command line driven, there shouldn't be any problems. However, whatever the Rational scripts need to run has to be installed on the system running Jenkins - David W. 2012-04-05 21:20
svn up I run svn --username radek status -qu to find out the status of the code base - Radek 2012-05-08 00:31
svn update should return a non-zero value if there were any failures (e.g. network error/disk error)
However an additional consideration is merge conflicts. svn update considers as "success" updating the working copy with merge conflicts.
Therefore, it may be important for you to also run svn status -q and look for files with "C" status, depending on your application--I'm assuming you want to take a different action if the update completes with conflicts.
svn help status to see a list of what each character means. (there are a couple dozen different letter codes - William Leara 2012-04-05 11:52
use either the return code of the svn command(should be zero), or check the last line of the std-output. It should be something like:
At revision 123.
Keep in mind, that you should have the correct LOCALE