Add build for tests.
Improve build of tests.