test: add test-lib helper

So that we have a common shared setup.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>