So basically all you can do it drive it away from the test centre to a place of repair and drive it back to the test centre.
As I understand it, an MOT cert cannot be invalidated, so even though there's an MOT failure sheet, so long as the car is roadworthy, and an old cert is still in date, you should be within the law.
However, I am not a lawyer, so last time my car failed an MOT, I fixed it the same day (Saturday), drove it on Sunday, and got it retested on 6am Monday, even though I had another week or so on the old certificate. My view was that I was pretty unlikely to run into any police on a Sunday, and the car was roadworthy as I'd fixed it. But I wasn't keen to take any more chances than that!