Simplify autotest code.