Hi, (posting from outside, so please CC me)
I was asking for an interface for automated package testing on #debian-mentors, but there does not seem to be such an interface. What I was thinking about would be some kind of script being invoked before a package is installed or upgraded, after it is upgraded or installed and after it is removed. Such a script should be allowed to create temporary files usable within multiple invocations and should be able to fail with a message. So why do I need that? I'd like to rebuild and test my personal archive with package-specific test cases. As usual using some kind of interface known to other developers will be useful and perhaps piuparts could make use of these kind of tests. Is there already something like this? If so, please tell me and I'll be happy to use it. Please ignore the rest of this mail if there is a way to do this. ;-) If not, let me propose an interface: Within a source package there could be a new file called debian/$pkg.test (or something similar) which will be invoked in a similar way as {pre,post}{inst,rm}. A test run might then look like: 1) Create a chroot/vm/whatever. 2) Invoke $pkg.test preinst 3) Install $pkg. 4) Invoke $pkg.test postinst 5) Remove $pkg. 6) Invoke $pkg.test postrm 7) Remove the chroot/vm/whatever. Another run might look like: 1) Create a chroot/vm/whatever. 2) Invoke $pkg.test preinst 3) Install old version of $pkg. 4) Invoke $pkg.test postinst 5) Upgrade $pkg. 6) Invoke $pkg.test postupgrade. 7) Remove $pkg. 8) Invoke $pkg.test postrm 9) Remove the chroot/vm/whatever. Please note that I do not propose the archive regular being tested this way. I'm only looking for some interface that might be compatible with the rest of the world. Further thoughts: Maybe debian/control may need to be extended by "Test-Depends", because tests might get written in Python, although Python is neither a dependency of the package nor essential. Also there might be tools assisting in package testing doing common tasks like checking for file system modifications (piuparts does this). So what do you think about this? Greetings Helmut
signature.asc
Description: Digital signature