1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-03-04 09:17:51 +00:00

SSH/Gem5Connection: Only remove echo in gem5_shell if required

Only attempt to remove echoed commands from the shell during parsing
if gem5 is actually echoing commands otherwise this can cause incorrect
filtering.
This commit is contained in:
Marc Bonnici 2017-11-22 11:21:31 +00:00 committed by setrofim
parent 2a8f2c51d7
commit eaafe6c0eb

View File

@ -727,11 +727,11 @@ class Gem5Connection(TelnetConnection):
output = output[command_index + len(command):].strip() output = output[command_index + len(command):].strip()
# It is possible that gem5 will echo the command. Therefore, we need to # If the gem5 system echoes the executed command, we need to remove that too!
# remove that too! if self.strip_echoed_commands:
command_index = output.find(command) command_index = output.find(command)
if command_index != -1: if command_index != -1:
output = output[command_index + len(command):].strip() output = output[command_index + len(command):].strip()
gem5_logger.debug("gem5_shell output: {}".format(output)) gem5_logger.debug("gem5_shell output: {}".format(output))