Fixed test build process to do it in pieces to use less ram.