You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Hao (Victor) Ren" <re...@cs.toronto.edu> on 2005/11/30 07:29:20 UTC

running server side tests

hello,

I am trying to setup subversion so that when a user commits source code 
files to a server, the server can start running some unit tests on the 
source code, and if the source code does not pass any of the tests, the 
user can be notified, and the files are not submitted.

To do this, I am planning to write a make file that runs the tests. So 
on the server side, when ever a user commits files (source code), there 
should be some hook calling the make file, and run the tests. Please 
give me some advice on how exactly this should be done.

I am a beginner to this, but I do not see any folders or files on the 
server side, so where can I put the make file that runs tests and where 
should the make file look for source code files that the user commited?

thank you
Victor

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: running server side tests

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 30, 2005, at 08:29, Hao (Victor) Ren wrote:

> I am trying to setup subversion so that when a user commits source  
> code files to a server, the server can start running some unit  
> tests on the source code, and if the source code does not pass any  
> of the tests, the user can be notified, and the files are not  
> submitted.
>
> To do this, I am planning to write a make file that runs the tests.  
> So on the server side, when ever a user commits files (source  
> code), there should be some hook calling the make file, and run the  
> tests. Please give me some advice on how exactly this should be done.
>
> I am a beginner to this, but I do not see any folders or files on  
> the server side, so where can I put the make file that runs tests  
> and where should the make file look for source code files that the  
> user commited?

You write a pre-commit hook. It goes in an executable file with the  
name "pre-commit" in the hooks directory of your repository  
directory. The pre-commit hook can then call any other files you have  
located anywhere.

Please see this recent thread for some discussion of this very issue,  
including some reasons why you may not want to do all of that in the  
pre-commit hook, and a suggestion of what you could do instead:

http://svn.haxx.se/users/archive-2005-11/0438.shtml


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org