Unit tests for busybox

Bartosz Gołaszewski bartekgola at gmail.com
Mon Nov 4 21:24:02 UTC 2013


Hi!

While working on my small free-time project - a compact message bus
for embedded systems (think small dbus) - I wrote a simple unit
testing framework.

The project is hosted on github: https://github.com/Zajcev/busybus
(BTW - is it ok to use the name 'busybus'?)

The test framework and some initial tests can be found under this directory:
https://github.com/Zajcev/busybus/tree/master/test/unit

There are still some things to implement: more assertions, death tests etc.

What makes it different from - let's say - Check
(http://check.sourceforge.net/) is that it's very simple and doesn't
require additional test registration (it uses the GCC 'constructor'
attribute to affect the initialization order). Also it is a part of
the project, which means that it doesn't add any additional
dependencies.

What do you think about including this framework in busybox? There is
a TODO, which mentions adding some unit-tests for libbusybox
functions. If you think this is a good idea I can prepare some patches
with the framework itself and some initial example tests for functions
like smart_ulltoa4() or in_ether().

Best regards,
Bartosz Golaszewski


More information about the busybox mailing list