This ensures all the tools needed for building disk images are present.
It's needed for builder.py.
We are running the same test multiple times, so we can de-duplicate the logic so that it is written only once and reused for each variant.