[arch-dev-public] Finally: unit testing for our dbscritps
Hi all, hacking on dbscritps was always a pain because manual tests were too much work...so we mostly "tested" on the live system. To make our live easier I have started to add a test suite based on shunit2 (see http://code.google.com/p/shunit2/; if we want to use this in other scripts I could put that into extra). I have added some helper scripts which create some sample packages, svn repo, staging dir etc. within a temp dir. Tests are more or less easy now; see http://projects.archlinux.org/dbscripts.git/tree/test/runTest for some examples. (this is also the script you have to run to check dbscripts) I'll add some more tests and hopefully new features to our dbscripts can be added more easily without the fear of major breakage. Greetings, Pierre -- Pierre Schmitz, https://users.archlinux.de/~pierre
On 08/08/10 04:20, Pierre Schmitz wrote:
Hi all,
hacking on dbscritps was always a pain because manual tests were too much work...so we mostly "tested" on the live system. To make our live easier I have started to add a test suite based on shunit2 (see http://code.google.com/p/shunit2/; if we want to use this in other scripts I could put that into extra).
I have added some helper scripts which create some sample packages, svn repo, staging dir etc. within a temp dir. Tests are more or less easy now; see http://projects.archlinux.org/dbscripts.git/tree/test/runTest for some examples. (this is also the script you have to run to check dbscripts)
I'll add some more tests and hopefully new features to our dbscripts can be added more easily without the fear of major breakage.
This is really helpful work Pierre. I have had a quick read though of that patches and it looks good. It would be great to get the package pool stuff pushed before the "great python transition of 2010". Allan
On Sun, 08 Aug 2010 09:44:22 +1000, Allan McRae <allan@archlinux.org> wrote:
It would be great to get the package pool stuff pushed before the "great python transition of 2010".
The scripts are mostly done; maybe a little cleanup and refactoring. The tests should now cover the most important use cases. I have also added some tests to simulate a smooth transition from our current layout to a package pool. Sorry for the high number of commits; but these scripts need some major cleanup or rewrite. There is lots of redundant, suboptimal or just broken code. In short: we are ready to go. I just need some admin to setup the dirs on gerolde and sigurd. (maybe rsync needs to be adjusted, too) Greetings, Pierre -- Pierre Schmitz, https://users.archlinux.de/~pierre
On Sun, 08 Aug 2010 16:49:12 +0200, Pierre Schmitz <pierre@archlinux.de> wrote:
On Sun, 08 Aug 2010 09:44:22 +1000, Allan McRae <allan@archlinux.org> wrote:
It would be great to get the package pool stuff pushed before the "great python transition of 2010". In short: we are ready to go. I just need some admin to setup the dirs on gerolde and sigurd. (maybe rsync needs to be adjusted, too)
Btw: I plan to add better support for moving or adding a large number of packages at the same time. This is needed to make these moves more or less atomic. For example you'll be able to pipe a list of packages into db-move: $ cat python-rebuild.txt | db-move - testing extra i686 Ideally we would have some kind of transactions; but that's not easy to implement. At least due to package pooling db-move became quite cheap as there is no need to move big pacakges around. Greetings, Pierre -- Pierre Schmitz, https://users.archlinux.de/~pierre
participants (2)
-
Allan McRae
-
Pierre Schmitz