improved test build and run support