info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ucing commitcheck to test compile code


From: Mark D. Baushke
Subject: Re: ucing commitcheck to test compile code
Date: Mon, 04 Aug 2003 03:38:49 -0700

JacobRhoden <address@hidden> writes:

> Hi,
> 
> I have setup a commitcheck.pl file to test comple any perl source
> which is added to a repository, i would like to do the same with gcc
> for any c/c++ code. Has anyone already done this, or have a useful
> commitcheck script. Is there a command which lets you just test a c
> file for syntax? (For perl im using 'perl -c' which does the test
> compile).

In the client/server mode of operation, the /tmp/cvs-serv<pid> directory
is where the commitinfo trigger is run and the tree will not typically
contain a fully populated tree and any desired compilation arguments
such as adding -I or -D switches will be unlikely to be present.

In addition, during the time that it takes to do the test compile of any
of the sources, the set of directories locked by the commit will be
unavailable to the rest of your users for cvs checkout, cvs udpate, cvs
diff (unless they used the cvs -n diff variation), cvs status (unless
they provide the -n switch), and cvs commit. This will be true
regardless of the branch you are using.

If you really feel the need to audit the files that are committed before
allowing them to proceed, I suggest you may be more interested in using
a multi-approval SCM system such as Aegis rather than using cvs.

For what it is worth, I have seen where some sites will have the commit
log messages e-mailed to a build engine that will examine the diff,
checkout the appropriate module(s) and perform a test build of the newly
committed code and report any problems back to the committer as well as
the 'owners' of the modules that were broken. This is especially useful
for big projects that need to be compiled on many different host or
target environments.

        Enjoy!
        -- Mark




reply via email to

[Prev in Thread] Current Thread [Next in Thread]