[pkg-php-pear] First success with PHPUnit

Thomas Goirand zigo at debian.org
Thu May 10 18:15:07 UTC 2012


On 05/11/2012 12:03 AM, Olivier Berger wrote:
>> Your help would be really appreciated. Are your issues with your work
>> on the way to get solved?
> 
> You shouldn't discuss this here as this relates to still not
> declassified archives, and I can't discuss that in public.

Oh, I'm sorry for this, my deepest apologies. I really didn't think that
writing "issues with your work" was disclosing anything, EVERYONE has
issues with work that eat time... But thanks for reminding me that I
should shut up! :)

>> Will you have some time for Debian soon? I'd be great for
>> example if you could upload your libnusoap package into SID instead of
>> experimental...
>>
> 
> Well, I'm struggling with priorities, and that's not likely to be on
> higher priority (neither nusoap or phpunit) I'm afraid, but I'm still
> keeping an eye on these.

The problem is that Wheezy is approaching, and we don't have much time
remaining to finish what has started. Never mind, I'll try to work on
this then.

FYI, I have just activated unit testings for php-mail at build time, and
it works just great! :)

Just FYI, here's how it looks like:

zigo@<host> ~/sources/pkg-php/php-mail/php-mail$ cat debian/rules
#!/usr/bin/make -f

%:
        dh $@ --buildsystem=phppear --with phppear

pear_pkg = $(shell ls | grep Mail)

override_dh_link:
        dh_link -O--buildsystem=phppear
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
        chmod +x ./debian/tests_run
        ./debian/tests_run $(pear_pkg)
endif

zigo@<host> ~/sources/pkg-php/php-mail/php-mail$ cat debian/tests_run
#!/bin/sh

set -e

pear_pkg=`ls | grep Mail`

cd ${pear_pkg}
PKG_ROOT=`pwd`
cd tests

for i in *.phpt ; do
        echo Testing with ${i}
        phpunit -d include_path=".:/usr/share/php:${PKG_ROOT}" ${i}
done

Of course, what's in "Depends:" needs now to go as well in
"Build-Depends:" otherwise the tests are stupidly failing. :)
Also note that the check of DEB_BUILD_OPTIONS values, so we can disable
checks at build time, are *mandatory* (as it's written in the bible^W
policy-manual).

Cheers,

Thomas Goirand (zigo)



More information about the pkg-php-pear mailing list