PackageKit self checks

PackageKit is quite a complicated code base. As with all my projects, there is a substantial self check framework that’s designed to catch bugs and regressions before we push releases. This was something enforced by my previous employer, but I’m sure it’s a good idea for any non-trivial code base, and it’s something I’ll continue to do.

Self check example
Self check example

The number of tests currently:

daemon: 216
libpackagekit: 202
gnome-packagekit: 75

The tests are all injecting valid and invalid input and then testing if the code does the right thing. This works really well for the daemon and the library, but does not work well for the GUI applications that need a full GUI framework.

I’ve tried dogtail, but I’m finding it hard to use, and really wanted something I could integrate with my existing system in C. Do any of you hackers recommend anything in particular or should I persist with dogtail? So far it’s looking best of the bunch.

Published by

hughsie

Richard has over 10 years of experience developing open source software. He is the maintainer of GNOME Software, PackageKit, GNOME Packagekit, GNOME Power Manager, GNOME Color Manager, colord, and UPower and also contributes to many other projects and opensource standards. Richard has three main areas of interest on the free desktop, color management, package management, and power management. Richard graduated a few years ago from the University of Surrey with a Masters in Electronics Engineering. He now works for Red Hat in the desktop group, and also manages a company selling open source calibration equipment. Richard's outside interests include taking photos and eating good food.

6 thoughts on “PackageKit self checks”

  1. Wow, I wrote that really badly. “I’ve actually had bugs that were masked because the code wasn’t testing everything that I thought it was.” should actually read “I’ve actually had bugs that were masked because the tests weren’t exercising all of the code that I thought they were”.

  2. PackageKit for windows… any plan to put it on windows. It could be integrated with open source programs and we could update them through there, life could be sweet :)

Comments are closed.