Re: Re: cvs: pear /Validate package_AT.xml /Validate/Validate AT.php /Validate/tests validate_AT.phpt
| From: | Hannes Magnusson | Date: | Thu, 23 Aug 2007 12:52:39 +0000 |
| Subject: | Re: Re: cvs: pear /Validate package_AT.xml /Validate/Validate AT.php /Validate/tests validate_AT.phpt | ||
| References: | 1 2 3 4 | Groups: | php.pear.cvs php.pear.qa |
| Request: | Send a blank email to pear-qa+get-4494@lists.php.net to get a copy of this message | ||
You two are three weeks to late with your complaints.
He mailed -dev and -qa with a list of things he had planned, which
included fixing the tests to work with this new test suite.
Best practice or not, I hate the fact I need to *reinstall* the
package just to run the tests to see if anything failed, I really
appreciate these fixes.
-Hannes
On 8/22/07, Helgi Þormar Þorbjörnsson <helgith@gmail.com> wrote:
> Hello,
>
> Well the test suite should be adapted to work with CVS instead of via versa,
> if you've done this fix in any other Validate package then please revert it,
> adding extra code so external tools can do some fluffy stuff to the package
> (even in this case where the tool is extremely useful) is not good practice.
>
> - Helgi
>
> On 8/22/07, Ken Guest <kguest@php.net> wrote:
> >
> > On Tue, Aug 21, 2007 at 11:26:15PM -0500, Gregory Beaver wrote:
> > > Ken Guest wrote:
> > > > kguest Tue Aug 21 23:01:09 2007 UTC
> > > >
> > > > Modified files:
> > > > /pear/Validate package_AT.xml
> > > > /pear/Validate/Validate AT.php
> > > > /pear/Validate/tests validate_AT.phpt
> > > > Log:
> > > > Bug #11885 coding standard errors plus DATADIR reference won't work
> > when testing from CVS
> > >
> > > [snip]
> > >
> > > > - $file = '@DATADIR@/Validate_AT/AT_postcodes.txt';
> > > > + if ($dataDir != null && (is_file($dataDir .
> > '/AT_postcodes.txt'))) {
> > > > + $file = $dataDir . '/AT_postcodes.txt';
> > > > + } else {
> > > > + $file = '@DATADIR@/Validate_AT/AT_postcodes.txt';
> > > > + }
> > > > $postcodes = array_map('trim', file($file));
> > >
> > > Hi Ken,
> > >
> > > This is not the best practice. When testing code from CVS, the best way
> > > to do it is have a console window open (or dos box on windows) in which
> > > you have typed:
> > >
> > > pear up -f package_AT.xml
> > >
> > > in the Validate CVS checkout directory. Then, when you make a change,
> > > hit <up arrow> <enter> and run your examples after your Validate_AT has
> > > updated. With these two additional keystrokes per edit, you can both
> > > ensure your package.xml is valid and that it works as expected from
> > > installation, and remove debugging hacks like the thing above.
> >
> > This is for the PEAR-wide unit test suite that is directly run from cvs;
> > unless
> > the test suite is adapted to install each package, test it and then
> > uninstall
> > the package there is probably no option but to have solutions like this in
> > place.
> >
> > > Ask on irc if you want more detailed tips on this - I think it's
> > > probably the most important thing I've learned while working in PEAR.
> > > Never run a package off of CVS unless you also intend users to run it
> > > from an unzip-and-go, then you should test both ways when making a
> > change.
> >
> > Thanks for your advice Greg - I hope there is a faq [or some other stable
> > form of knowledge repository] of these tips rather than having to rely
> > on IRC and all that it entails.
> >
> >
> > k.
> >
> > --
> > Ken Guest
> > Mobile: +353 86 8252 141
> > http://blogs.linux.ie/kenguest/
> > Irish PHP Users Group http://www.php.ie
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.2.2 (GNU/Linux)
> >
> > iD8DBQFGy+/qigdNTD9+4fIRAsASAJ0chYiFAJyfIkrIHRkGtQ4ijsxahgCdEwcJ
> > t/3qYCBxuCKLTSosIk314Bk=
> > =Qgq7
> > -----END PGP SIGNATURE-----
> >
> >
>