Merge test script changes from 1.4-master.