[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wireshark-dev
Subject:    Re: [Wireshark-dev] VB: [Wireshark-commits] rev
From:       Gerald Combs <gerald () wireshark ! org>
Date:       2009-11-23 22:11:29
Message-ID: 4B0B0891.5060806 () wireshark ! org
[Download RAW message or body]

Guy Harris wrote:
> Gerald, can SVN be set up to run source files (.c, .h, etc.) through  
> the API filter at checkin time, rejecting them if they get errors?

Joerg asked about this recently. Subversion lets you run "hook scripts"
at various points in the commit process:
http://svnbook.red-bean.com/en/1.2/svn.reposadmin.create.html#svn.reposadmin.create.hooks

The Wireshark SVN repository has a post-commit hook that triggers the
buildbots, sends out a commit message, and triggers a sync between the
read-write repository and the read-only (anonsvn) repository.

It looks like API checking should happen during the pre-commit phase.
The script itself is just handed a repository path and a revision
number. It has to fetch the contents of the file itself. There's a
contributed utility called "Enforcer" that will do this, which we could
then presumably hand off to checkAPIs.pl:

http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/enforcer/

The problem is that checkAPIs is run with a number of different options
depending on the file we're checking. E.g. most dissectors are checked
with "-g abort -g termoutput" while the gtk code is checked with no
arguments at all. We'd have to figure out which arguments to use based
on the file path or its contents.

checkAPIs.pl will be run outside the SVN tree, so we'd have to keep it
up to date. This _shouldn't_ be a problem since it doesn't change that
often.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic