The Japanese website DC Watch has an article about the equipment used to test Leica M cameras:
In the pictures above you can see the machine called “W6” – my understanding is that only four places in the world have this 200kg machine that is used to test Leica M rangefinders: USA, Germany, China and Japan.
Next is the optical testing machine called “MTF-Master” (click for larger view):
Another interesting fact – the parallax correction machine used today is from 1950, which is when the Leica M3 was first introduced:
Leica shutter speed testing and sensor positioning machines:
Additional information and pictures available at DC Watch.