testing individual autopkgtest tests

Paul Gevers elbrus at debian.org
Sun Jan 22 18:33:38 UTC 2017


Hi Martin,

On 01/22/17 16:37, Martin Pitt wrote:
> Paul Gevers [2017-01-21 22:45 +0100]:
>> Other question, have you ever thought about making python commands also
>> work properly in the chroot during testing? Today I was bitten for the
>> second time that if you do stuff with python commands instead of shell
>> commands, you are not looking in the chroot, but on the host system.
> 
> I had to read this three times to (hopefully) understand this -- you are not
> talking about running tests with the chroot runner, but about
> "tests/autopkgtest ChrootRinner", right?

Yes, I want to run tests/autopkgtest ChrootRunner.test_apt_*.

>> E.g. I'd like to use "os.listdir('/etc/apt/sources.list.d') ..." instead
>> of "self.check_exec(['sh', '-ec', 'ls /etc/apt/sources.list.d/*.list
>> 2>/dev/null || true'], stdout=True).strip() ..."
> 
> What stops you from using
> 
>   os.listdir(os.path.join(self.chroot, 'etc/apt/sources.list.d'))

Sorry for the confusion, but I am talking about code in lib/adt_testbed.
I don't expect self.chroot to apply there.

> instead? You can of course also install python3 and its dependencies into the
> chroot and call that using subprocess, but IMHO that's waaaay to complicated --
> the charm of chroots is that they are just about as easy to access from the
> outside than from the inside :-)

Not sure if you meant that also for lib/adt_testbed, but as said, I did
try to install_elf('/usr/bin/python3.5') in the tests/autopkgtest, but
that didn't work.

Paul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20170122/84615819/attachment-0001.sig>


More information about the autopkgtest-devel mailing list