Update in travis.yml. Follow the travis recommended build lifecycle: call ctest in script section, instea of after_script.