Bug#742242: please provide a simple way to run simple tests locally without upgrading the system.
retitle 742242 Running a .dsc with null requires root privileges
Charles Plessy [2014-03-21 16:00 +0900]:
> I like autopkgtest, but the need to use either a virtual system or treat the
> local system as if it were virtual raises the bar quite high.
Interesting, you don't use schroots for test-building packages? But
anyway, that's a tangential issue.
> I have some simple tests that do nothing else than running the upstream
> tests, which themselves are very simple. I would be very happy if there
> were a command that would take a source package as input and do nothing
> else than running the tests declared in debian/tests/control.
Well, the simplest possible thing that you can do is to just run
debian/tests/mytest :-) Of course you won't have $ADTTMP in that case,
so if your tests need that that won't work; and of course it won't
check that all dependencies are installed properly.
> More in particular, my problem is that the command ?adt-run package.dsc ---
> null? needs root access and is very invasive on the local system, while I only
> want to run the tests on binary packages that I have freshly installed, on my
> local system as it is.
It shouldn't actually be invasive; as long as you already installed
the test dependencies, it won't actually install anything. Adt-run
with null already works as user if you run it on a source tree, like
adt-run -B ./ --- null # for a built source tree
adt-run -B .// --- null # for an unbuilt source tree
But indeed if you run it on a .dsc, it will always try to apt-get
install dpkg-dev. I'll add a check to avoid this step if it's already
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)