Split out most of test into separate shell script.