Re: Re: cvs: pear /PEAR_Command_Packaging/tests/make-rpm-spec test1.outtest1.phpttest_option_rpm-depname.out test_option_rpm-depname.phpt
test_option_rpm-pkgname.outtest_option_rpm-pkgname.phpttest_option_rpm-release.out test_option_rpm-re

From: Date: Fri, 17 Feb 2006 15:33:02 +0000
Subject: Re: Re: cvs: pear /PEAR_Command_Packaging/tests/make-rpm-spec test1.outtest1.phpttest_option_rpm-depname.out test_option_rpm-depname.phpt
test_option_rpm-pkgname.outtest_option_rpm-pkgname.phpttest_option_rpm-release.out test_option_rpm-re
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41364@lists.php.net to get a copy of this message
On 2/17/06, bertrand Gugger <bertrand@toggg.com> wrote: > Justin Patrin wrote: > > >On 2/16/06, bertrand Gugger <bertrand@toggg.com> wrote: > > > >>Do you mean tests are allowed to require a package without introducing a > >>dependency ? > >>I ask it as I have a similar case and up to now I was reluctant to > >>introduce some more dependency just for tests, so I did not do it. > >>It's nice for me if it's allowed. > >> > >> > > > >If a test has a dependency that a package doesn't have I'd say that's > >kind of strange. But regardless of why, if a test has a dependency > >that the package does not have, there is no added dependency on the > >package. That simply doesn't make sense. It should just be noted in > >the test (perhaps as part of the output) that a certain package is > >needed. > > > > > Reminds me another case. > Normally required test procedures may be furnished in various formats: > * php original .phpt (as does DB) (?) > * pear "extended" / "customized" / "made easier" .phpt > * PHPUnit or for PHP5 only (should) packages PHPUnit2 (?) > * simpletest ... or any "well known / accepted" external mean (?) > > (?) == not in Guidelines but well accepted consensus. (refer QA discussions) > > Now, for the topic here, say I want to install some package having > choosed PHPUnit tests and then, requiring it in package.xml. > Say I don't have PHPUnit installed. > Then , I may not install this package. > Is it not bloody ? > There's worse, some packages are PHP4 / PHP5 compatible but tests are > PHPUnit2. > Then you need PHP5 to install them. > > Also, pear run-tests (.phpt) tests don't put some dependency on pear. > > So, even if it introduces some sugar for implementers to get lazy about > tests, I believe they should not introduce some extra dependency. > This is exactly what I said. Dependencies for a package should be *only* what you need for the package to run. If the tests introduce extra dependencies then that should be noted in the tests (perhaps in a README in the tests dir) but never add dependencies to the package. It *could* be a solution to make them optional dependencies but I don't much like this either as it could easily be construed that the package itself is able to use this optional dependency when this is not actually the case. One way to do this would be, if a package's tests require more/different dependencies than the package, to have a subpackage for the tests which includes the extra dependencies. > Any official test mean, if only required in tests, should not create > some more dependency. > Testers know what they do ... or should :) > > As a link to a related current topic, I even believe edge tests , or > tests for edges packages can present (more) tests only in CVS, in the > sense testers are hopefuly educated persons. > > I believe in tests. -- Justin Patrin

« previous php.pear.dev (#41364) next »