OoO  Vers la  fin de  l'après-midi du  lundi 02  mars 2009,  vers 16:21,
Josselin Mouette <j...@debian.org> disait :

>> I ask  this because I  have many packages  that use unittests  after the
>> build.  I add  /var/lib/python-support  to PYTHONPATH  and launch  those
>> tests. Because the path has changed, this does not work any more.
>> 
>> You suggest to run those tests against the sources instead. However, the
>> main interests of those tests for me is to check that the binary package
>> works as expected. For example, if setup.py (or debian/rules) forgets to
>> ship one  file, this would  go unseen if  unittests are run  against the
>> sources.

> In this case, you should run the unit tests from the directory where you
> install the modules, before running dh_pysupport.

I use this snippet then (with cdbs):

ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
common-install-indep::

        PYTHONPATH='debian/$(cdbs_curpkg)/$(cdbs_python_support_path)/' \
                python tests/runner.py

        # Importing the modules generates .pyc files, and dh_python (which
        # normally cleans them) has already been run. Remove them manually.
        find 'debian/$(cdbs_curpkg)' -name '*.py[co]' -print0 \
        | xargs -0 rm -f --
endif
-- 
BART BUCKS, ARE NOT LEGAL TENDER
BART BUCKS, ARE NOT LEGAL TENDER
BART BUCKS, ARE NOT LEGAL TENDER
-+- Bart Simpson on chalkboard in episode 8F06

Attachment: pgp1HuIgpOUvl.pgp
Description: PGP signature

Reply via email to