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

David Prévot david at tilapin.org
Sun Feb 9 14:20:04 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

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).

> [...]
>> Side note: I had to mimic the Composer autoload feature [4] (via
>> ClassLoader from Symfony), no idea if pkg-php-tools could be improved to
>> create an autoload file, nor if php-composer could help (maybe andrea
>> would know).

> I thought that there were no good way to have the Composer autoload
> systemwide, untill I read this message:
> 
> http://lists.kolab.org/pipermail/devel/2014-February/014896.html

Great, so there is still hope, explicit CC to andrea who may be able to
share more light on php-composer packaging status, and its eventual
features.

> However, I'm currently too busy (and don't maintain any composer
> package) to add this feature soon.

Fair enough, thanks for sharing your thoughts (someone who maintain
composer packages may step in and propose patches ;). I’ve started to
fix some of my packages to use a PSR-0 compliant path (php-opencloud
included) that should also help in (default) autoloading.

Regards

David


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBCAAGBQJS946TAAoJEAWMHPlE9r08kZIH/3vVU5aVF9dCo9l5Q4QSXJlC
7o1sIxhoM2DAmgie6cagvXsp9Tyc3UU0qCAvRAWa32ajTr1Z3ngqk5YUzz5km4us
wk/8W9i70SBIK8LTV23jmu3tgW2rE3AvgVoPMQJD0uF25T39hMCiHEsb52CKhbi3
9ytogYlSVn5kmVkI6O51M2k9/wM9O2vsSh8CFD0hG04K21vJwQug0wFoMgDbpnrI
cVUGNcymf6XA6Iyuj0MABBHA4sIcc8gauLJ1cpZNA8GojVdPw6gI5r7XlTu4e+3w
reHjMlBleTwntBA1AoxiP+yrOT2BxJP9DdyCKjrPSG4HonlTQ3Gmd0Hs/MjXz3Y=
=HSqe
-----END PGP SIGNATURE-----



More information about the pkg-php-pear mailing list