Move the libtest code into a 'libtest' subdirectory and make it one of the SUBDIRS in the tests Makefile. having it at the top level required having "." as one of the subdirs, and that caused the unit tests to be executed twice.