On Feb 22, 2011, at 03:51 PM, Andrey Rahmatullin wrote: >In many cases $PYTHON setup.py test (for all supported $PYTHON's) is >enough to run the tests and any errors mean that something is wrong with >the environment (provided the tests are correct). > >Shouldn't we have some written recommendations (or even policy) on this >matter? Probably so. Here's what I use in my flufl packages. Maybe there's a better way, but it works and runs the tests against all available Python2 interpreters. (I need to enable Python3 at some point.) -----snip snip----- #!/usr/bin/make -f PYTHON2=$(shell pyversions -vr) %: dh $@ --with python2, --buildsystem python_distutils test-python%: python$* setup.py test -vv override_dh_auto_test: $(PYTHON2:%=test-python%) -----snip snip----- It would be nice if dh auto-detected a setup.py (and/or missing Makefile) and didn't run 'make test' in that case, so that the override_dh_auto_test wasn't necessary. Yah, I should create a bug and patch for that. -Barry
Attachment:
signature.asc
Description: PGP signature