compile source only once for tests