add test support in travis and cmake