Fix test script for travis ci