[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: running server side tests

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-11-30 10:51:04 CET

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
Received on Wed Nov 30 11:11:16 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.