[test CML] Misc fixes and add test of cli