forked from public/pysim
pySim-shell_test/utils: treat cmd2 error "not a recognized command... as exception
When a pySim-shell command is not recognized, cmd2 prints "xyz is not a recognized command, alias, or macro." This string is a normal print out and not an exception, but during tests, it may point out a severe problem and therefore it should be tread like an exception. Related: OS#6367 Change-Id: I17be6af1547b31170622e17b9cfb9c492597670d
This commit is contained in:
@@ -285,7 +285,7 @@ class UnittestUtils(unittest.TestCase):
|
|||||||
raise RuntimeError("pySim-shell exits with error code %u" % py_sim_shell_rc)
|
raise RuntimeError("pySim-shell exits with error code %u" % py_sim_shell_rc)
|
||||||
|
|
||||||
# Check log for exceptions
|
# Check log for exceptions
|
||||||
exception_regex_compiled = re.compile('.*EXCEPTION.*')
|
exception_regex_compiled = re.compile('.*EXCEPTION.*|.*is not a recognized command, alias, or macro.*')
|
||||||
exceptions_strings = re.findall(exception_regex_compiled, logfile_content)
|
exceptions_strings = re.findall(exception_regex_compiled, logfile_content)
|
||||||
if exceptions_strings != []:
|
if exceptions_strings != []:
|
||||||
print("The following exceptions occurred:")
|
print("The following exceptions occurred:")
|
||||||
|
|||||||
Reference in New Issue
Block a user