What method are you using to test a debian / ubuntu package?

I'm talking about testing the package you are building, especially the one that spawns daemon and / or scripts with init.d.

Do you go into some kind of chroot? Are you creating a virtualized distribution and ripping it off? How do you validate your runtime dependencies and test suite without disrupting your development computer the next time you run your tests?

+1


source to share


3 answers


A virtualized machine that you reset to a "clean" state after testing will be the easiest. VMWare and Parallels' Snapshot features are perfect for this.

You have installed Debian or Ubuntu, then take a snapshot (How-to for VMware and Parallels ). Then you will install your package and test installation, usage and uninstallation.



Once you're done, it is trivial to restore the snapshot (much faster than reinstalling it entirely)

+2


source


chroots are commonly used for testing packages.



0


source


I personally use my own machine while developing packages. This is not possible if you are packaging older distributions, but it is much faster than using any other solutions if your packaging code has a lot of junk.

To test package builds, you need to use a chroot based tool like pbuilder, cowbuilder, or sbuild. This will ensure that the package is built with the correct dependency on the target distribution.

You can test some software in the chroot, but things like the network daemon conflict with another daemon running on the host machine.

If your set of packages is complex, the best test environment you can use is VM software that supports snapshot. You need to create a virtual environment with your target distribution and install the package on it. With snapshots, you can reset the production environment to its post-installation state.

You can only work with one snapshot, but VirtualBox supports multiple snapshots, which gives you additional flexibility for complex tests.

0


source







All Articles