[cli] always output command result (#4556)

Always output command result, i.e. "Done" on success, error message
otherwise.

Factory commands also follow the same pattern. Their existing error
messages are not removed for backward compatibility consideration.
This commit is contained in:
Yakun Xu
2020-02-19 11:44:42 -08:00
committed by GitHub
parent c8dff09d3a
commit aa62fd8f65
22 changed files with 129 additions and 183 deletions
+2 -2
View File
@@ -47,8 +47,8 @@ class TestDiag(unittest.TestCase):
def test(self):
cases = [
('diag\n', 'diagnostics mode is disabled\r\n'),
('diag send 10 100\n', 'failed\r\nstatus 0xd\r\n'),
('diag start\n', 'start diagnostics mode\r\nstatus 0x00\r\n'),
('diag send 10 100\n', 'Error 13: InvalidState\r\n'),
('diag start\n', 'Done\r\n'),
('diag invalid test\n',
'diag feature \'invalid\' is not supported'),
('diag', 'diagnostics mode is enabled\r\n'),