[pkg-php-pear] Running tests at build time, and installed via DEP-8

Prach Pongpanich prachpub at gmail.com
Sun Feb 9 15:07:20 UTC 2014


Hi,

On Sun, Feb 9, 2014 at 9:20 PM, David Prévot <david at tilapin.org> wrote:
[...]
> Le 09/02/2014 03:41, Mathieu Parent a écrit :
>> 2014/2/9 David Prévot <david at tilapin.org>:
>
>> One question: Does "pear run-tests" behave like the "phpunit" you use?
>> (and exit with !=0 if there is a failure).
>
> I don’t know « pear run-tests », but I successfully tested that the
> build fails if a test fails (so that it exits with !=0 on failure).
>
> I’ve prepared another approach for running the tests sooner during the
> package build (via dh_auto_test), but have to patch the package
> differently for DEP-8 to make sure the installed version is used (I’ll
> push it after a bit more tests).
>
>> We can add buildtime check to pkg-php-tools but we should ensure that
>> there is a guessable command to run.
>
> The presence of phpunit.xml.dist may be a good hint that “phpunit” is
> the right command to run. I may open a bug report (and hopefully provide
> a patch) once I’ve implemented such tests on other packages (i.e., once
> I have more experiences with that).

FYI, we can use phpunit instead of "pear run-tests" [0], which
supported PHPT file[1].
Some of our package [2], that run tests at build time (phpunit & phpt).

[0] https://wiki.php.net/pear/qa/ci
[1] http://pear.php.net/manual/en/pyrus.commands.runphpt.php
[2] https://wiki.debian.org/PHP/PHPUnit3.6

Regards,
 Prach



More information about the pkg-php-pear mailing list