mlafeldt/sharness — pull request #12 by seveas (2014-09-14 19:57:44+00:00)
Title: Add a 'cleanup' api to register cleanup actions

To reduce boilerplate code, sharness can be included via a helper
script, which can do any and all common actions, except cleaning up.
Make it possible for such helpers to register cleanup actions.

For example, in
[seveas/azuki](https://github.com/seveas/azuki/tree/master/test), I build my
tests as:

test_description="Test kick"
. ./setup.sh

actual tests go here

clean_tubes
test_done

With setup.sh containing:

. ./sharness.sh
common test code for my tests goes here

It would be useful if that could also include `cleanup clean_tubes`, so I don't
need to add it to each test.