Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Automating tests before a CVS commit

by EvdB (Deacon)
on Jul 08, 2004 at 09:57 UTC ( #372727=perlquestion: print w/ replies, xml ) Need Help??
EvdB has asked for the wisdom of the Perl Monks concerning the following question:

Before commiting files to my CVS repository I would like some checks to be run:
# Todo before commiting for *.pl, *.pm, *.PL perl -c $file perltidy -b $file ./Build test
I seem to remember that this can be done but cannot find anything here or on Google that helps. I'm probably not using the right jargon. Does anyone have a way to do this and are there other things that should be done before a commit?

update: Sod's law: Automating tests before a CVS commit. Still interested in other things that could/should be done before a commit.

--tidiness is the memory loss of environmental mnemonics

Comment on Automating tests before a CVS commit
Select or Download Code
Re: Automating tests before a CVS commit
by davorg (Chancellor) on Jul 08, 2004 at 09:59 UTC
    You can add these items you your project's "commitinfo" file.
    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

      I'm having trouble getting this working as I want it to.
      --- commitinfo --- pl$ $CVSROOT/CVSROOT/commit-perl.bash pm$ $CVSROOT/CVSROOT/commit-perl.bash PL$ $CVSROOT/CVSROOT/commit-perl.bash --- commit-perl.bash --- #!/bin/bash perl -c $1 || exit 1 perltidy -b $1 || exit 1 --- sample.pl --- #!/usr/bin/perl my $test = '";
      I am still allowed to commit sample.pl, even though I shouldn't be. Any suggestions.

      Also I would like to run tests locally (ie not on server). Can this be done?.

      --tidiness is the memory loss of environmental mnemonics

Re: Automating tests before a CVS commit
by iburrell (Chaplain) on Jul 08, 2004 at 16:15 UTC
    CVS does not support running scripts on the client before doing a commit. It does have a mechanism, the commitinfo file, for running commands on the server before doing a commit. The program can abort the commit by returning a non-zero exit code.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://372727]
Approved by pelagic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2014-09-21 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (172 votes), past polls