Bug#809442: autopkgtest: Add a way to run the same test script in multiple environments
Rapha?l Hertzog [2015-12-30 19:33 +0100]:
> I just added some DEP-8 tests to python-django and it would have been nice
> if I could have reused the same script in multiple environments (python2
> only, python3 only). Right now I created symlinks to the same script
> and the sole purpose of the symlink is to provide a different identifier
> for autopkgtest.
This is actually what "Test-Command:" is intended for. For your case
you'd only have debian/tests/django.py (without a hashbang) and run it
Test-Command: python debian/tests/django.py
Test-Command: python3 debian/tests/django.py
> I would suggest to be able to append something "@variant" like to
> test names. It would keep that suffix to identify the test but it would
> strip it to find the test script to actually run. The suffix would
> be passed in ADT_VARIANT so that the script can make use of it if needed
> (usually to set some different default values).
You can't use environment variables in hashbangs, so this wouldn't
help you that much -- you would still need a wrapper shell script like
which doesn't make the thing any easier or more elegant.
So from my POV I consider Test-Command: generic and flexible enough
for this. What do you think?
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)